diff --git a/specs/capella/beacon-chain.md b/specs/capella/beacon-chain.md index 42fbf85bd..3e89bc257 100644 --- a/specs/capella/beacon-chain.md +++ b/specs/capella/beacon-chain.md @@ -310,7 +310,7 @@ def get_expected_withdrawals(state: BeaconState) -> Sequence[Withdrawal]: withdrawal_index = WithdrawalIndex(withdrawal_index + 1) if len(ret) == MAX_WITHDRAWALS_PER_PAYLOAD: break - return ret + return withdrawals ``` #### New `process_withdrawals` diff --git a/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py b/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py index 83162e1c2..93befaf5f 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py +++ b/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py @@ -30,8 +30,7 @@ def build_empty_execution_payload(spec, state, randao_mix=None): transactions=empty_txs, ) if is_post_capella(spec): - num_withdrawals = min(spec.MAX_WITHDRAWALS_PER_PAYLOAD, len(state.withdrawal_queue)) - payload.withdrawals = state.withdrawal_queue[:num_withdrawals] + payload.withdrawals = spec.get_expected_withdrawals(state) # TODO: real RLP + block hash logic would be nice, requires RLP and keccak256 dependency however. payload.block_hash = spec.Hash32(spec.hash(payload.hash_tree_root() + b"FAKE RLP HASH"))