mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-26 01:05:15 +00:00
minor test style change, avoid state copy
This commit is contained in:
parent
dfcd6f6402
commit
7baf81e4c2
@ -122,15 +122,15 @@ def test_shorter_chain_but_heavier_weight(spec, state):
|
||||
@with_all_phases
|
||||
@spec_state_test
|
||||
def test_filtered_block_tree(spec, state):
|
||||
genesis_state = state.copy()
|
||||
# Initialization
|
||||
genesis_state_root = state.hash_tree_root()
|
||||
store = spec.get_genesis_store(state)
|
||||
genesis_block = spec.BeaconBlock(state_root=genesis_state_root)
|
||||
|
||||
# transition state past initial couple of epochs
|
||||
next_epoch(spec, state)
|
||||
next_epoch(spec, state)
|
||||
|
||||
# Initialization
|
||||
store = spec.get_genesis_store(genesis_state)
|
||||
genesis_block = spec.BeaconBlock(state_root=genesis_state.hash_tree_root())
|
||||
assert spec.get_head(store) == spec.signing_root(genesis_block)
|
||||
|
||||
# fill in attestations for entire epoch, justifying the recent epoch
|
||||
|
Loading…
x
Reference in New Issue
Block a user