コード例 #1
0
def test_chaindb_get_block_by_root(chaindb, block, fork_choice_scoring):
    chaindb.persist_block(block, block.__class__, fork_choice_scoring)
    result_block = chaindb.get_block_by_root(block.signing_root, block.__class__)
    validate_ssz_equal(result_block, block)
コード例 #2
0
ファイル: test_beacon_chaindb.py プロジェクト: mhchia/trinity
def test_chaindb_get_block_by_root(chaindb, block):
    chaindb.persist_block(block, block.__class__)
    result_block = chaindb.get_block_by_root(block.signed_root, block.__class__)
    validate_ssz_equal(result_block, block)