Skip to content

Commit

Permalink
harmonize process_withdrawals spec with ethereum#3761
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes committed Aug 28, 2024
1 parent a5990f9 commit c763163
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 c763163

Please sign in to comment.