Add epoch > REUSE_VALIDATOR_INDEX_DELAY condition

This commit is contained in:
dapplion 2023-03-28 15:46:01 +09:00
parent ee3e1ac63e
commit c1273bbfa4
1 changed files with 3 additions and 2 deletions

View File

@ -45,8 +45,9 @@ def is_reusable_validator(validator: Validator, balance: Gwei, epoch: Epoch) ->
Check if ``validator`` index can be re-assigned to a new deposit.
"""
return (
validator.withdrawable_epoch < epoch - REUSE_VALIDATOR_INDEX_DELAY
and balance == 0
epoch > REUSE_VALIDATOR_INDEX_DELAY
and validator.withdrawable_epoch < epoch - REUSE_VALIDATOR_INDEX_DELAY
and balance == 0
)
```