Fix a bug in fork pruning (#1507)

Extracted from https://github.com/sigp/lighthouse/pull/1380 because merging #1380 proves to be contentious.

Co-authored-by: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
Adam Szkoda
2020-08-12 07:00:00 +00:00
parent 61367efa64
commit 8a1a4051cf
3 changed files with 29 additions and 18 deletions

View File

@@ -743,7 +743,7 @@ fn prunes_abandoned_fork_between_two_finalized_checkpoints() {
let (stray_blocks, stray_states, _, stray_head, _) = harness.add_stray_blocks(
harness.get_head_state(),
slot,
slots_per_epoch - 1,
slots_per_epoch - 3,
&faulty_validators,
);