mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-09 13:56:23 +00:00
verifyFinalization checks for justification being consistent with later finalization (#1386)
This commit is contained in:
parent
0ffcbd10e5
commit
a07dab300c
@ -500,6 +500,9 @@ proc process_epoch*(state: var BeaconState, updateFlags: UpdateFlags,
|
|||||||
process_justification_and_finalization(state, per_epoch_cache, updateFlags)
|
process_justification_and_finalization(state, per_epoch_cache, updateFlags)
|
||||||
|
|
||||||
# state.slot hasn't been incremented yet.
|
# state.slot hasn't been incremented yet.
|
||||||
|
if verifyFinalization in updateFlags and currentEpoch >= 2:
|
||||||
|
doAssert state.current_justified_checkpoint.epoch + 2 >= currentEpoch
|
||||||
|
|
||||||
if verifyFinalization in updateFlags and currentEpoch >= 3:
|
if verifyFinalization in updateFlags and currentEpoch >= 3:
|
||||||
# Rule 2/3/4 finalization results in the most pessimal case. The other
|
# Rule 2/3/4 finalization results in the most pessimal case. The other
|
||||||
# three finalization rules finalize more quickly as long as the any of
|
# three finalization rules finalize more quickly as long as the any of
|
||||||
|
Loading…
x
Reference in New Issue
Block a user