From c7631634fb90a13e6f2de0be26b7499f6270bfa8 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Wed, 28 Aug 2024 16:01:10 -0600 Subject: [PATCH] harmonize `process_withdrawals` spec with #3761 --- specs/electra/beacon-chain.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/specs/electra/beacon-chain.md b/specs/electra/beacon-chain.md index cb5ee6a7a..b18006b64 100644 --- a/specs/electra/beacon-chain.md +++ b/specs/electra/beacon-chain.md @@ -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]