fix transactions field in exec payload helper

This commit is contained in:
protolambda 2021-05-05 15:40:56 +02:00
parent 470c6dcc6f
commit ff3a82e0f3
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623
2 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,7 @@ def build_empty_execution_payload(spec, state):
timestamp=timestamp,
receipt_root=b"no receipts here" + b"\x00"*16, # TODO: root of empty MPT may be better.
logs_bloom=spec.ByteVector[spec.BYTES_PER_LOGS_BLOOM](), # TODO: zeroed logs bloom for empty logs ok?
transactions_root=empty_txs,
transactions=empty_txs,
)
# 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"))

View File

@ -1,4 +1,5 @@
from eth2spec.test.helpers.constants import PHASE0, ALTAIR
from eth2spec.test.helpers.execution_payload import build_empty_execution_payload
from eth2spec.test.context import spec_state_test, expect_assertion_error, always_bls, with_all_phases_except
with_merge_and_later = with_all_phases_except([PHASE0, ALTAIR])
@ -36,7 +37,7 @@ def test_success_first_payload(spec, state):
assert not spec.is_transition_completed(state)
# TODO: execution payload
execution_payload = spec.ExecutionPayload()
execution_payload = build_empty_execution_payload(spec, state)
yield from run_execution_payload_processing(spec, state, execution_payload)