mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-01-31 07:58:06 -05:00
Fix has_sufficient_effective_balance computation
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user