Skip to content

Commit ea34405

Browse files
marioevzdanceratopz
andauthoredMay 26, 2025
Apply suggestions from code review to src/ethereum_test_execution/get_blobs.py
Co-authored-by: danceratopz <danceratopz@gmail.com>
1 parent 0f679a2 commit ea34405

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed
 

‎src/ethereum_test_execution/get_blobs.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,16 @@ def execute(self, fork: Fork, eth_rpc: EthRPC, engine_rpc: EngineRPC | None):
6565
)
6666
version = fork.engine_get_blobs_version()
6767
assert version is not None, "Engine get blobs version is not supported by the fork."
68-
resp = engine_rpc.get_blobs(list(versioned_hashes.keys()), version=version)
68+
blob_response = engine_rpc.get_blobs(list(versioned_hashes.keys()), version=version)
6969
local_blobs_and_proofs = list(versioned_hashes.values())
70-
assert len(resp) == len(local_blobs_and_proofs), (
71-
f"Expected {len(local_blobs_and_proofs)} blobs and proofs, got {len(resp)}."
72-
)
70+
if len(resp) != len(local_blobs_and_proofs):
71+
raise ValueError(f"Expected {len(local_blobs_and_proofs)} blobs and proofs, got {len(resp)}.")
7372
for local, remote in zip(local_blobs_and_proofs, resp.root, strict=False):
7473
if remote is None:
7574
raise ValueError("Remote blob is None.")
76-
assert local.blob == remote.blob, "Blob mismatch."
77-
assert local.proofs == remote.proofs, "Proofs mismatch."
75+
if local.blob != remote.blob:
76+
raise ValueError("Blob mismatch.")
77+
if local.proofs != remote.proofs:
78+
raise ValueError("Proofs mismatch.")
7879

7980
eth_rpc.wait_for_transactions(sent_txs)

0 commit comments

Comments
 (0)