mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-02 01:25:16 -05:00
Fix SSZ underflow
This commit is contained in:
@@ -53,7 +53,7 @@ def exit_random_validators(spec, state, rng, fraction=0.5, exit_epoch=None, with
|
||||
"""
|
||||
if from_epoch is None:
|
||||
from_epoch = spec.MAX_SEED_LOOKAHEAD + 1
|
||||
epoch_diff = from_epoch - spec.get_current_epoch(state)
|
||||
epoch_diff = int(from_epoch) - int(spec.get_current_epoch(state))
|
||||
for _ in range(epoch_diff):
|
||||
# NOTE: if `epoch_diff` is negative, then this loop body does not execute.
|
||||
next_epoch(spec, state)
|
||||
|
||||
Reference in New Issue
Block a user