add deposit_root to validator unit tets

This commit is contained in:
Danny Ryan 2020-05-20 14:03:16 -06:00
parent 96f785e84b
commit 61336a9c0b
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
1 changed files with 7 additions and 2 deletions

View File

@ -193,10 +193,12 @@ def test_get_eth1_vote_consensus_vote(spec, state):
block_1 = spec.Eth1Block(
timestamp=period_start - spec.SECONDS_PER_ETH1_BLOCK * spec.ETH1_FOLLOW_DISTANCE - 1,
deposit_count=state.eth1_data.deposit_count,
deposit_root=b'\x04' * 32,
)
block_2 = spec.Eth1Block(
timestamp=period_start - spec.SECONDS_PER_ETH1_BLOCK * spec.ETH1_FOLLOW_DISTANCE,
deposit_count=state.eth1_data.deposit_count,
deposit_count=state.eth1_data.deposit_count + 1,
deposit_root=b'\x05' * 32,
)
eth1_chain = [block_1, block_2]
eth1_data_votes = []
@ -227,10 +229,12 @@ def test_get_eth1_vote_tie(spec, state):
block_1 = spec.Eth1Block(
timestamp=period_start - spec.SECONDS_PER_ETH1_BLOCK * spec.ETH1_FOLLOW_DISTANCE - 1,
deposit_count=state.eth1_data.deposit_count,
deposit_root=b'\x04' * 32,
)
block_2 = spec.Eth1Block(
timestamp=period_start - spec.SECONDS_PER_ETH1_BLOCK * spec.ETH1_FOLLOW_DISTANCE,
deposit_count=state.eth1_data.deposit_count,
deposit_count=state.eth1_data.deposit_count + 1,
deposit_root=b'\x05' * 32,
)
eth1_chain = [block_1, block_2]
eth1_data_votes = []
@ -264,6 +268,7 @@ def test_get_eth1_vote_chain_in_past(spec, state):
block_1 = spec.Eth1Block(
timestamp=period_start - spec.SECONDS_PER_ETH1_BLOCK * spec.ETH1_FOLLOW_DISTANCE,
deposit_count=state.eth1_data.deposit_count - 1, # Chain prior to current eth1data
deposit_root=b'\x42' * 32,
)
eth1_chain = [block_1]
eth1_data_votes = []