From 5348b9a3b905dc3477c8bd9d3892c928b7d117ab Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Thu, 9 Sep 2021 15:56:08 -0600 Subject: [PATCH] randomize state can result in some exited vals for current epoch --- tests/core/pyspec/eth2spec/test/helpers/random.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/helpers/random.py b/tests/core/pyspec/eth2spec/test/helpers/random.py index b24d3c8c7..8448b2424 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/random.py +++ b/tests/core/pyspec/eth2spec/test/helpers/random.py @@ -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: