Skip to content

Commit

Permalink
Add extra %
Browse files Browse the repository at this point in the history
  • Loading branch information
potuz committed Nov 8, 2022
1 parent 99e2704 commit 8f42e48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions specs/capella/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,9 @@ def process_block(state: BeaconState, block: BeaconBlock) -> None:
def get_expected_withdrawals(state: BeaconState) -> Sequence[Withdrawal]:
epoch = get_current_epoch(state)
withdrawal_index = state.next_withdrawal_index
validator_index = state.latest_withdrawal_validator_index
validator_index = ValidatorIndex((state.latest_validator_index + 1) % len(state.validators))
withdrawals: List[Withdrawal] = []
for _ in range(len(state.validators)):
validator_index = ValidatorIndex((validator_index + 1) % len(state.validators))
validator = state.validators[validator_index]
balance = state.balances[validator_index]
if is_fully_withdrawable_validator(validator, balance, epoch):
Expand All @@ -310,6 +309,7 @@ def get_expected_withdrawals(state: BeaconState) -> Sequence[Withdrawal]:
withdrawal_index += WithdrawalIndex(1)
if len(withdrawals) == MAX_WITHDRAWALS_PER_PAYLOAD:
break
validator_index = ValidatorIndex((validator_index + 1) % len(state.validators))
return withdrawals
```
Expand Down

0 comments on commit 8f42e48

Please sign in to comment.