mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-01 14:35:18 -05:00
Add test_incorrect_blob_tx_type
This commit is contained in:
@@ -46,3 +46,20 @@ def test_one_blob(spec, state):
|
||||
@spec_state_test
|
||||
def test_max_blobs(spec, state):
|
||||
yield from run_block_with_blobs(spec, state, blob_count=spec.MAX_BLOBS_PER_BLOCK)
|
||||
|
||||
|
||||
@with_deneb_and_later
|
||||
@spec_state_test
|
||||
def test_incorrect_blob_tx_type(spec, state):
|
||||
yield 'pre', state
|
||||
|
||||
block = build_empty_block_for_next_slot(spec, state)
|
||||
opaque_tx, _, blob_kzg_commitments, _ = get_sample_opaque_tx(spec)
|
||||
block.body.blob_kzg_commitments = blob_kzg_commitments
|
||||
opaque_tx[0] == spec.uint8(0x04) # incorrect tx type
|
||||
block.body.execution_payload.transactions = [opaque_tx]
|
||||
block.body.execution_payload.block_hash = compute_el_block_hash(spec, block.body.execution_payload)
|
||||
signed_block = state_transition_and_sign_block(spec, state, block)
|
||||
|
||||
yield 'blocks', [signed_block]
|
||||
yield 'post', state
|
||||
|
||||
Reference in New Issue
Block a user