Skip to content

Commit cf3b776

Browse files
committed
Correct assert in revert_minority_fork_on_resume
1 parent 37be9ae commit cf3b776

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

beacon_node/beacon_chain/tests/store_tests.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2990,9 +2990,13 @@ async fn revert_minority_fork_on_resume() {
29902990
resumed_harness.chain.recompute_head_at_current_slot().await;
29912991
assert_eq!(resumed_harness.head_slot(), fork_slot - 1);
29922992

2993-
// Head track should know the canonical head and the rogue head.
2994-
assert_eq!(resumed_harness.chain.heads().len(), 2);
2995-
resumed_harness.assert_knows_head(resumed_harness.head_block_root());
2993+
// Fork choice should only know the canonical head. When we reverted the head we also should
2994+
// have called `reset_fork_choice_to_finalization` which rebuilds fork choice from scratch
2995+
// without the reverted block.
2996+
assert_eq!(
2997+
resumed_harness.chain.heads(),
2998+
vec![(resumed_harness.head_block_root(), fork_slot - 1)]
2999+
);
29963000

29973001
// Apply blocks from the majority chain and trigger finalization.
29983002
let initial_split_slot = resumed_harness.chain.store.get_split_slot();

0 commit comments

Comments
 (0)