Skip to content

Commit

Permalink
Merge pull request #3905 from ralexstokes/harmonize-electra-withdrawals
Browse files Browse the repository at this point in the history
harmonize `process_withdrawals` spec with #3761
  • Loading branch information
hwwhww authored Aug 29, 2024
2 parents 534cb06 + c763163 commit 0dd76d3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions specs/electra/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -1022,10 +1022,9 @@ def get_expected_withdrawals(state: BeaconState) -> Tuple[Sequence[Withdrawal],
def process_withdrawals(state: BeaconState, payload: ExecutionPayload) -> None:
expected_withdrawals, partial_withdrawals_count = get_expected_withdrawals(state) # [Modified in Electra:EIP7251]

assert len(payload.withdrawals) == len(expected_withdrawals)
assert payload.withdrawals == expected_withdrawals

for expected_withdrawal, withdrawal in zip(expected_withdrawals, payload.withdrawals):
assert withdrawal == expected_withdrawal
for withdrawal in expected_withdrawals:
decrease_balance(state, withdrawal.validator_index, withdrawal.amount)

# Update pending partial withdrawals [New in Electra:EIP7251]
Expand Down

0 comments on commit 0dd76d3

Please sign in to comment.