mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-20 15:38:55 +00:00
Fix has_sufficient_effective_balance computation
This commit is contained in:
parent
b18bbd8c61
commit
64da0da132
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user