Fix "is_ready_to_exit" condition

This commit is contained in:
Hsiao-Wei Wang 2019-02-26 15:10:34 +08:00
parent bb44d25665
commit b836b30bff
No known key found for this signature in database
GPG Key ID: 95B070122902DEA4
1 changed files with 1 additions and 1 deletions

View File

@ -1964,7 +1964,7 @@ def update_validator_registry(state: BeaconState) -> None:
# Exit validators within the allowable balance churn
balance_churn = 0
for index, validator in enumerate(state.validator_registry):
if validator.activation_epoch == FAR_FUTURE_EPOCH and validator.initiated_exit:
if validator.exit_epoch == FAR_FUTURE_EPOCH and validator.initiated_exit:
# Check the balance churn would be within the allowance
balance_churn += get_effective_balance(state, index)
if balance_churn > max_balance_churn: