mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-01 22:05:30 -05:00
randomize state can result in some exited vals for current epoch
This commit is contained in:
@@ -37,8 +37,8 @@ def exit_random_validators(spec, state, rng, fraction=None):
|
||||
continue
|
||||
|
||||
validator = state.validators[index]
|
||||
validator.exit_epoch = rng.choice([current_epoch - 1, current_epoch - 2, current_epoch - 3])
|
||||
# ~1/2 are withdrawable
|
||||
validator.exit_epoch = rng.choice([current_epoch, current_epoch - 1, current_epoch - 2, current_epoch - 3])
|
||||
# ~1/2 are withdrawable (note, unnatural span between exit epoch and withdrawable epoch)
|
||||
if rng.choice([True, False]):
|
||||
validator.withdrawable_epoch = current_epoch
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user