From 20e3934fa2fd66ca7dcc53b67f75fe088ae93ac2 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Mon, 23 Aug 2021 11:12:40 -0700 Subject: [PATCH] do not exit validators who are already exited --- tests/core/pyspec/eth2spec/test/helpers/multi_operations.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/core/pyspec/eth2spec/test/helpers/multi_operations.py b/tests/core/pyspec/eth2spec/test/helpers/multi_operations.py index 962ab6404..52234fa97 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/multi_operations.py +++ b/tests/core/pyspec/eth2spec/test/helpers/multi_operations.py @@ -136,7 +136,9 @@ def _eligible_for_exit(spec, state, index): activation_epoch = validator.activation_epoch active_for_long_enough = current_epoch >= activation_epoch + spec.config.SHARD_COMMITTEE_PERIOD - return not_slashed and active_for_long_enough + not_exited = validator.exit_epoch == spec.FAR_FUTURE_EPOCH + + return not_slashed and active_for_long_enough and not_exited def get_random_voluntary_exits(spec, state, to_be_slashed_indices, rng):