mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-12 18:46:22 +00:00
Merge pull request #3658 from ethereum/mkalinin-patch-6
EIP-7251: Fix has_sufficient_effective_balance computation
This commit is contained in:
commit
e6092db3fb
@ -686,7 +686,7 @@ def get_expected_withdrawals(state: BeaconState) -> Tuple[Sequence[Withdrawal],
|
|||||||
break
|
break
|
||||||
|
|
||||||
validator = state.validators[withdrawal.index]
|
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
|
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:
|
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)
|
withdrawable_balance = min(state.balances[withdrawal.index] - MIN_ACTIVATION_BALANCE, withdrawal.amount)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user