mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-02 22:03:37 +00:00
PR comments by jtraglia
This commit is contained in:
parent
2cd9c687cc
commit
f4989470c5
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user