From 270814e20fbc9b80cbe6c34eb1dff5534a4cd52e Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Sun, 22 Aug 2021 09:59:28 -0700 Subject: [PATCH] fix bug with `_epochs_until_leak` helper --- .../eth2spec/test/phase0/sanity/test_blocks_random.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/core/pyspec/eth2spec/test/phase0/sanity/test_blocks_random.py b/tests/core/pyspec/eth2spec/test/phase0/sanity/test_blocks_random.py index 52868c744..e0043332d 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/sanity/test_blocks_random.py +++ b/tests/core/pyspec/eth2spec/test/phase0/sanity/test_blocks_random.py @@ -61,7 +61,11 @@ def _randomize_state(spec, state): ## epochs def _epochs_until_leak(spec): - return spec.MIN_EPOCHS_TO_INACTIVITY_PENALTY + """ + State is "leaking" if the current epoch is at least + this value after the last finalized epoch. + """ + return spec.MIN_EPOCHS_TO_INACTIVITY_PENALTY + 1 def _epochs_for_shard_committee_period(spec):