mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-12 11:44:41 +00:00
randomize state can result in some exited vals for current epoch
This commit is contained in:
parent
989cd38041
commit
5348b9a3b9
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user