do not exit validators who are already exited

This commit is contained in:
Alex Stokes 2021-08-23 11:12:40 -07:00
parent 16423880aa
commit 20e3934fa2
No known key found for this signature in database
GPG Key ID: 99B3D88FD6C55A69
1 changed files with 3 additions and 1 deletions

View File

@ -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):