mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-29 20:27:14 +00:00
Fix broken tests in eth1
This commit is contained in:
@@ -727,6 +727,14 @@ mod test {
|
|||||||
prev_state.slot = Slot::new(period * 1_000);
|
prev_state.slot = Slot::new(period * 1_000);
|
||||||
state.slot = Slot::new(period * 1_000 + period / 2);
|
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| {
|
(0..2048).for_each(|i| {
|
||||||
eth1_chain
|
eth1_chain
|
||||||
.backend
|
.backend
|
||||||
@@ -798,6 +806,14 @@ mod test {
|
|||||||
|
|
||||||
state.slot = Slot::new(period / 2);
|
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);
|
let expected_root = Hash256::from_low_u64_be(42);
|
||||||
|
|
||||||
prev_state.eth1_data.block_hash = expected_root;
|
prev_state.eth1_data.block_hash = expected_root;
|
||||||
|
|||||||
Reference in New Issue
Block a user