Replace MAX_EB with MIN_AB

This commit is contained in:
Mikhail Kalinin 2024-04-03 17:45:48 +03:00 committed by GitHub
parent 9a6c8b67fa
commit 881768c9d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -454,9 +454,9 @@ def switch_to_compounding_validator(state: BeaconState, index: ValidatorIndex) -
```python
def queue_excess_active_balance(state: BeaconState, index: ValidatorIndex) -> None:
balance = state.balances[index]
if balance > MAX_EFFECTIVE_BALANCE:
excess_balance = balance - MAX_EFFECTIVE_BALANCE
state.balances[index] = balance - excess_balance
if balance > MIN_ACTIVATION_BALANCE:
excess_balance = balance - MIN_ACTIVATION_BALANCE
state.balances[index] = MIN_ACTIVATION_BALANCE
state.pending_balance_deposits.append(
PendingBalanceDeposit(index=index, amount=excess_balance)
)