Add non-zero data_gas_used case

This commit is contained in:
Hsiao-Wei Wang 2023-06-01 18:09:23 +08:00
parent 296efec256
commit 7bc5d51ce8
No known key found for this signature in database
GPG Key ID: AE3D6B174F971DE4

View File

@ -16,7 +16,7 @@ from eth2spec.test.helpers.sharding import (
)
def run_block_with_blobs(spec, state, blob_count, excess_data_gas=1, valid=True):
def run_block_with_blobs(spec, state, blob_count, excess_data_gas=1, data_gas_used=1, valid=True):
yield 'pre', state
block = build_empty_block_for_next_slot(spec, state)
@ -24,6 +24,7 @@ def run_block_with_blobs(spec, state, blob_count, excess_data_gas=1, valid=True)
block.body.blob_kzg_commitments = blob_kzg_commitments
block.body.execution_payload.transactions = [opaque_tx]
block.body.execution_payload.excess_data_gas = excess_data_gas
block.body.execution_payload.data_gas_used = data_gas_used
block.body.execution_payload.block_hash = compute_el_block_hash(spec, block.body.execution_payload)
if valid: