Skip to content

Commit

Permalink
Add non-zero data_gas_used case
Browse files Browse the repository at this point in the history
  • Loading branch information
hwwhww committed Jun 1, 2023
1 parent 296efec commit 7bc5d51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/core/pyspec/eth2spec/test/deneb/sanity/test_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@
)


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)
opaque_tx, _, blob_kzg_commitments, _ = get_sample_opaque_tx(spec, blob_count=blob_count)
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:
Expand Down

0 comments on commit 7bc5d51

Please sign in to comment.