PR comments by jtraglia

This commit is contained in:
Lucas Saldanha 2024-12-09 12:29:05 +13:00
parent 2cd9c687cc
commit f4989470c5
No known key found for this signature in database

View File

@ -586,8 +586,8 @@ def get_consolidation_churn_limit(state: BeaconState) -> Gwei:
```python
def get_pending_balance_to_withdraw(state: BeaconState, validator_index: ValidatorIndex) -> Gwei:
return sum(
withdrawal.amount for withdrawal in state.pending_partial_withdrawals if
withdrawal.validator_index == validator_index
withdrawal.amount for withdrawal in state.pending_partial_withdrawals
if withdrawal.validator_index == validator_index
)
```
@ -1133,7 +1133,8 @@ def get_expected_withdrawals(state: BeaconState) -> Tuple[Sequence[Withdrawal],
has_excess_balance = state.balances[withdrawal.validator_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.validator_index] - MIN_ACTIVATION_BALANCE, withdrawal.amount)
state.balances[withdrawal.validator_index] - MIN_ACTIVATION_BALANCE,
withdrawal.amount)
withdrawals.append(Withdrawal(
index=withdrawal_index,
validator_index=withdrawal.validator_index,