mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Problem: Wrong dict key for public keys in fixtures
Solution: Fixed the fixtures
This commit is contained in:
parent
cf3530ed59
commit
028a31a5f4
@ -39,7 +39,7 @@ class ValidatorElection(Transaction):
|
||||
validators = {}
|
||||
for validator in bigchain.get_validators():
|
||||
# NOTE: we assume that Tendermint encodes public key in base64
|
||||
public_key = public_key_from_ed25519_key(key_from_base64(validator['pub_key']['value']))
|
||||
public_key = public_key_from_ed25519_key(key_from_base64(validator['pub_key']['data']))
|
||||
validators[public_key] = validator['voting_power']
|
||||
|
||||
return validators
|
||||
|
||||
@ -390,7 +390,7 @@ def test_upsert_validator_new_without_tendermint(b, priv_validator_path, user_sk
|
||||
|
||||
def mock_get():
|
||||
return [
|
||||
{'pub_key': {'value': 'zL/DasvKulXZzhSNFwx4cLRXKkSM9GPK7Y0nZ4FEylM=',
|
||||
{'pub_key': {'data': 'zL/DasvKulXZzhSNFwx4cLRXKkSM9GPK7Y0nZ4FEylM=',
|
||||
'type': 'tendermint/PubKeyEd25519'},
|
||||
'voting_power': 10}
|
||||
]
|
||||
|
||||
@ -30,7 +30,7 @@ def mock_get_validators(network_validators):
|
||||
validators = []
|
||||
for public_key, power in network_validators.items():
|
||||
validators.append({
|
||||
'pub_key': {'type': 'AC26791624DE60', 'value': public_key},
|
||||
'pub_key': {'type': 'AC26791624DE60', 'data': public_key},
|
||||
'voting_power': power
|
||||
})
|
||||
return validators
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user