Fix has_sufficient_effective_balance computation

This commit is contained in:
Mikhail Kalinin 2024-04-07 18:15:01 +06:00 committed by GitHub
parent b18bbd8c61
commit 64da0da132
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -686,7 +686,7 @@ def get_expected_withdrawals(state: BeaconState) -> Tuple[Sequence[Withdrawal],
break
validator = state.validators[withdrawal.index]
has_sufficient_effective_balance = validator.effective_balance == MIN_ACTIVATION_BALANCE
has_sufficient_effective_balance = validator.effective_balance >= MIN_ACTIVATION_BALANCE
has_excess_balance = state.balances[withdrawal.index] > MIN_ACTIVATION_BALANCE
if validator.exit_epoch == FAR_FUTURE_EPOCH and has_sufficient_effective_balance and has_excess_balance:
withdrawable_balance = min(state.balances[withdrawal.index] - MIN_ACTIVATION_BALANCE, withdrawal.amount)