update test_eth1_data_votes_no_consensus to not hardcode pre hash

This commit is contained in:
protolambda 2019-10-25 13:39:50 +02:00
parent 2186c45f84
commit 2cc643d2bb
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623
1 changed files with 3 additions and 1 deletions

View File

@ -509,6 +509,8 @@ def test_eth1_data_votes_no_consensus(spec, state):
if spec.SLOTS_PER_ETH1_VOTING_PERIOD > 16:
return
pre_eth1_hash = state.eth1_data.block_hash
offset_block = build_empty_block(spec, state, slot=spec.SLOTS_PER_ETH1_VOTING_PERIOD - 1)
sign_block(spec, state, offset_block)
state_transition_and_sign_block(spec, state, offset_block)
@ -528,7 +530,7 @@ def test_eth1_data_votes_no_consensus(spec, state):
blocks.append(block)
assert len(state.eth1_data_votes) == spec.SLOTS_PER_ETH1_VOTING_PERIOD
assert state.eth1_data.block_hash == b'\x00' * 32
assert state.eth1_data.block_hash == pre_eth1_hash
yield 'blocks', blocks
yield 'post', state