Skip to content

Commit

Permalink
right ret
Browse files Browse the repository at this point in the history
  • Loading branch information
potuz committed Nov 3, 2022
1 parent 329bafa commit a09d617
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion specs/capella/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
3 changes: 1 addition & 2 deletions tests/core/pyspec/eth2spec/test/helpers/execution_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit a09d617

Please sign in to comment.