right ret
This commit is contained in:
parent
329bafa6e2
commit
a09d617737
|
@ -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`
|
||||
|
|
|
@ -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"))
|
||||
|
|
Loading…
Reference in New Issue