diff --git a/beacon_node/beacon_chain/src/eth1_chain.rs b/beacon_node/beacon_chain/src/eth1_chain.rs index aa61b70294..2e3bf87656 100644 --- a/beacon_node/beacon_chain/src/eth1_chain.rs +++ b/beacon_node/beacon_chain/src/eth1_chain.rs @@ -727,6 +727,14 @@ mod test { prev_state.slot = Slot::new(period * 1_000); state.slot = Slot::new(period * 1_000 + period / 2); + // Add 50% of the votes so a lookup is required. + for _ in 0..period / 2 { + state + .eth1_data_votes + .push(random_eth1_data()) + .expect("should push eth1 vote"); + } + (0..2048).for_each(|i| { eth1_chain .backend @@ -798,6 +806,14 @@ mod test { state.slot = Slot::new(period / 2); + // Add 50% of the votes so a lookup is required. + for _ in 0..period / 2 { + state + .eth1_data_votes + .push(random_eth1_data()) + .expect("should push eth1 vote"); + } + let expected_root = Hash256::from_low_u64_be(42); prev_state.eth1_data.block_hash = expected_root;