mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Problem: Validators fixture patched the validators, but never unpatched them
Solution: Modified the fixture so it sets everything back the way it was once the test is done
This commit is contained in:
parent
5db6735415
commit
32459c6a75
@ -710,6 +710,8 @@ def priv_validator_path(node_keys):
|
||||
def validators(b, node_keys):
|
||||
from bigchaindb.backend import query
|
||||
|
||||
original_validators = b.get_validators()
|
||||
|
||||
(public_key, private_key) = list(node_keys.items())[0]
|
||||
|
||||
validator_set = [{'address': 'F5426F0980E36E03044F74DD414248D29ABCBDB2',
|
||||
@ -719,6 +721,13 @@ def validators(b, node_keys):
|
||||
'voting_power': 10}]
|
||||
|
||||
validator_update = {'validators': validator_set,
|
||||
'height': 4266642}
|
||||
'height': b.get_latest_block()['height'] + 1}
|
||||
|
||||
query.store_validator_set(b.connection, validator_update)
|
||||
|
||||
yield
|
||||
|
||||
validator_update = {'validators': original_validators,
|
||||
'height': b.get_latest_block()['height']}
|
||||
|
||||
query.store_validator_set(b.connection, validator_update)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user