mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-04 23:04:55 +00:00
add consolidation_requests_root to get_execution_payload_header test helper
This commit is contained in:
parent
f0ef76ada1
commit
1970b56f8f
@ -37,6 +37,7 @@ def get_execution_payload_header(spec, execution_payload):
|
||||
if is_post_electra(spec):
|
||||
payload_header.deposit_receipts_root = spec.hash_tree_root(execution_payload.deposit_receipts)
|
||||
payload_header.withdrawal_requests_root = spec.hash_tree_root(execution_payload.withdrawal_requests)
|
||||
payload_header.consolidation_requests_root = spec.hash_tree_root(execution_payload.consolidation_requests)
|
||||
return payload_header
|
||||
|
||||
|
||||
@ -59,7 +60,8 @@ def compute_el_header_block_hash(spec,
|
||||
transactions_trie_root,
|
||||
withdrawals_trie_root=None,
|
||||
deposit_receipts_trie_root=None,
|
||||
withdrawal_requests_root=None):
|
||||
withdrawal_requests_root=None,
|
||||
consolidation_requests_root=None):
|
||||
"""
|
||||
Computes the RLP execution block hash described by an `ExecutionPayloadHeader`.
|
||||
"""
|
||||
@ -110,6 +112,8 @@ def compute_el_header_block_hash(spec,
|
||||
execution_payload_header_rlp.append((Binary(32, 32), deposit_receipts_trie_root))
|
||||
# withdrawal requests root
|
||||
execution_payload_header_rlp.append((Binary(32, 32), withdrawal_requests_root))
|
||||
# consolidation requests root
|
||||
execution_payload_header_rlp.append((Binary(32, 32), consolidation_requests_root))
|
||||
|
||||
sedes = List([schema for schema, _ in execution_payload_header_rlp])
|
||||
values = [value for _, value in execution_payload_header_rlp]
|
||||
|
Loading…
x
Reference in New Issue
Block a user