File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
src/ethereum_spec_tools/evm_tools/t8n Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1313from ethereum_types .numeric import U64 , Uint
1414
1515from ethereum import trace
16- from ethereum .exceptions import EthereumException
16+ from ethereum .exceptions import EthereumException , InvalidBlock
1717from ethereum_spec_tools .forks import Hardfork
1818
1919from ..loaders .fixture_loader import Load
@@ -245,7 +245,10 @@ def run_blockchain_test(self) -> None:
245245 )
246246
247247 if self .fork .is_after_fork ("ethereum.prague" ):
248- self .fork .process_general_purpose_requests (block_env , block_output )
248+ try :
249+ self .fork .process_general_purpose_requests (block_env , block_output )
250+ except InvalidBlock as e :
251+ self .result .block_exception = f"{ e } "
249252
250253 self .result .update (self , block_env , block_output )
251254 self .result .rejected = self .txs .rejected_txs
Original file line number Diff line number Diff line change @@ -267,6 +267,7 @@ class Result:
267267 blob_gas_used : Optional [Uint ] = None
268268 requests_hash : Optional [Hash32 ] = None
269269 requests : Optional [List [Bytes ]] = None
270+ block_exception : Optional [str ] = None
270271
271272 def get_receipts_from_tries (
272273 self , t8n : Any , tx_trie : Any , receipts_trie : Any
@@ -372,5 +373,8 @@ def to_json(self) -> Any:
372373 # T8N doesn't consider the request type byte to be part of the
373374 # request
374375 data ["requests" ] = [encode_to_hex (req ) for req in self .requests ]
376+
377+ if self .block_exception is not None :
378+ data ["blockException" ] = self .block_exception
375379
376380 return data
You can’t perform that action at this time.
0 commit comments