mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Problem: mismatch value for type field
Solution: auto-fill the default value for type
This commit is contained in:
parent
e7e7cea4eb
commit
e69237c3dd
@ -16,7 +16,7 @@ def encode_validator(v):
|
||||
|
||||
|
||||
def decode_validator(v):
|
||||
return {'public_key': {'type': v.pub_key.type,
|
||||
return {'public_key': {'type': 'ed25519-base64',
|
||||
'value': codecs.encode(v.pub_key.data, 'base64').decode().rstrip('\n')},
|
||||
'voting_power': v.power}
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ def mock_get_validators(network_validators):
|
||||
validators = []
|
||||
for public_key, power in network_validators.items():
|
||||
validators.append({
|
||||
'public_key': {'type': 'AC26791624DE60', 'value': public_key},
|
||||
'public_key': {'type': 'ed25519-base64', 'value': public_key},
|
||||
'voting_power': power
|
||||
})
|
||||
return validators
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user