mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00

* Problem: Validator set not tracked by BigchainDB Solution: BigchainDB depends on tendermint's RPC API to get the validator set which is not avaiable during replay so the validators set should be tracked inside BigchainDB * Problem: Unclear code and documentation Solution: Fix decode_validator and docs strings * Problem: Doc strings missing Solution: Add doc string for store_validato_set
26 lines
655 B
Python
26 lines
655 B
Python
import pytest
|
|
import codecs
|
|
|
|
import abci.types_pb2 as types
|
|
|
|
|
|
@pytest.fixture
|
|
def b():
|
|
from bigchaindb import BigchainDB
|
|
return BigchainDB()
|
|
|
|
|
|
@pytest.fixture
|
|
def validator_pub_key():
|
|
return 'B0E42D2589A455EAD339A035D6CE1C8C3E25863F268120AA0162AD7D003A4014'
|
|
|
|
|
|
@pytest.fixture
|
|
def init_chain_request():
|
|
addr = codecs.decode(b'9FD479C869C7D7E7605BF99293457AA5D80C3033', 'hex')
|
|
pk = codecs.decode(b'VAgFZtYw8bNR5TMZHFOBDWk9cAmEu3/c6JgRBmddbbI=', 'base64')
|
|
val_a = types.Validator(address=addr, power=10,
|
|
pub_key=types.PubKey(type='ed25519', data=pk))
|
|
|
|
return types.RequestInitChain(validators=[val_a])
|