Skip to content

Commit

Permalink
eip-4844: test tx_peek_blob_versioned_hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
protolambda committed Oct 6, 2022
1 parent c7d88b7 commit 2d08dc5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/core/pyspec/eth2spec/test/eip4844/unittests/test_offset.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

from eth2spec.test.helpers.constants import (
EIP4844,
MINIMAL,
)
from eth2spec.test.helpers.sharding import (
get_sample_opaque_tx,
)
from eth2spec.test.context import (
with_phases,
spec_state_test,
with_presets,
)


@with_phases([EIP4844])
@spec_state_test
@with_presets([MINIMAL])
def test_tx_peek_blob_versioned_hashes(spec, state):
otx, blobs, commitments = get_sample_opaque_tx(spec)
data_hashes = spec.tx_peek_blob_versioned_hashes(otx)
expected = [spec.kzg_commitment_to_versioned_hash(blob_commitment) for blob_commitment in commitments]
assert expected == data_hashes

0 comments on commit 2d08dc5

Please sign in to comment.