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 = {}
|
validators = {}
|
||||||
for validator in bigchain.get_validators():
|
for validator in bigchain.get_validators():
|
||||||
# NOTE: we assume that Tendermint encodes public key in base64
|
# 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']
|
validators[public_key] = validator['voting_power']
|
||||||
|
|
||||||
return validators
|
return validators
|
||||||
|
|||||||
@ -390,7 +390,7 @@ def test_upsert_validator_new_without_tendermint(b, priv_validator_path, user_sk
|
|||||||
|
|
||||||
def mock_get():
|
def mock_get():
|
||||||
return [
|
return [
|
||||||
{'pub_key': {'value': 'zL/DasvKulXZzhSNFwx4cLRXKkSM9GPK7Y0nZ4FEylM=',
|
{'pub_key': {'data': 'zL/DasvKulXZzhSNFwx4cLRXKkSM9GPK7Y0nZ4FEylM=',
|
||||||
'type': 'tendermint/PubKeyEd25519'},
|
'type': 'tendermint/PubKeyEd25519'},
|
||||||
'voting_power': 10}
|
'voting_power': 10}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -30,7 +30,7 @@ def mock_get_validators(network_validators):
|
|||||||
validators = []
|
validators = []
|
||||||
for public_key, power in network_validators.items():
|
for public_key, power in network_validators.items():
|
||||||
validators.append({
|
validators.append({
|
||||||
'pub_key': {'type': 'AC26791624DE60', 'value': public_key},
|
'pub_key': {'type': 'AC26791624DE60', 'data': public_key},
|
||||||
'voting_power': power
|
'voting_power': power
|
||||||
})
|
})
|
||||||
return validators
|
return validators
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user