diff --git a/tests/core/pyspec/eth2spec/test/helpers/multi_operations.py b/tests/core/pyspec/eth2spec/test/helpers/multi_operations.py index 32998b3ba..68ca02b91 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/multi_operations.py +++ b/tests/core/pyspec/eth2spec/test/helpers/multi_operations.py @@ -44,7 +44,7 @@ def run_slash_and_exit(spec, state, slash_index, exit_index, valid=True): def get_random_proposer_slashings(spec, state, rng): - num_slashings = rng.randrange(spec.MAX_PROPOSER_SLASHINGS) + num_slashings = max(1, rng.randrange(spec.MAX_PROPOSER_SLASHINGS)) active_indices = spec.get_active_validator_indices(state, spec.get_current_epoch(state)).copy() indices = [ index for index in active_indices