fix bug with `_epochs_until_leak` helper

This commit is contained in:
Alex Stokes 2021-08-22 09:59:28 -07:00
parent 820affd2aa
commit 270814e20f
No known key found for this signature in database
GPG Key ID: 99B3D88FD6C55A69
1 changed files with 5 additions and 1 deletions

View File

@ -61,7 +61,11 @@ def _randomize_state(spec, state):
## epochs ## epochs
def _epochs_until_leak(spec): 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): def _epochs_for_shard_committee_period(spec):