Fix SSZ underflow
This commit is contained in:
parent
7480fad8cd
commit
e70ef11b4d
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue