Merge pull request #3647 from ethereum/mkalinin-patch-6
EIP-7251: Use MIN_ACTIVATION_BALANCE instead of MAX_EFFECTIVE_BALANCE
This commit is contained in:
commit
f5207db2c4
|
@ -454,9 +454,9 @@ def switch_to_compounding_validator(state: BeaconState, index: ValidatorIndex) -
|
||||||
```python
|
```python
|
||||||
def queue_excess_active_balance(state: BeaconState, index: ValidatorIndex) -> None:
|
def queue_excess_active_balance(state: BeaconState, index: ValidatorIndex) -> None:
|
||||||
balance = state.balances[index]
|
balance = state.balances[index]
|
||||||
if balance > MAX_EFFECTIVE_BALANCE:
|
if balance > MIN_ACTIVATION_BALANCE:
|
||||||
excess_balance = balance - MAX_EFFECTIVE_BALANCE
|
excess_balance = balance - MIN_ACTIVATION_BALANCE
|
||||||
state.balances[index] = balance - excess_balance
|
state.balances[index] = MIN_ACTIVATION_BALANCE
|
||||||
state.pending_balance_deposits.append(
|
state.pending_balance_deposits.append(
|
||||||
PendingBalanceDeposit(index=index, amount=excess_balance)
|
PendingBalanceDeposit(index=index, amount=excess_balance)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue