mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-12 19:54:34 +00:00
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…
x
Reference in New Issue
Block a user