diff --git a/tests/core/pyspec/eth2spec/test/helpers/random.py b/tests/core/pyspec/eth2spec/test/helpers/random.py index bf603b2c8..0dc446d19 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/random.py +++ b/tests/core/pyspec/eth2spec/test/helpers/random.py @@ -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)