Skip to content

Commit 1b6b1ee

Browse files
authored
Fixed error messages in TraceTracer for invalid opcode and jump destination (#127)
1 parent 0ccbdd7 commit 1b6b1ee

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

integration/mainnet/trace_block/test_01.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@
729729
},
730730
"blockHash": "0xb425a0ecfa4b74abf04a6f73c7e323b4b7220c8a96f12fff30b60172cfc50973",
731731
"blockNumber": 4417196,
732-
"error": "bad jump destination",
732+
"error": "invalid jump destination",
733733
"result": null,
734734
"subtraces": 1,
735735
"traceAddress": [],

integration/mainnet/trace_block/test_03.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
},
4545
"blockHash": "0x0621386f998fd3cfd761657ff81d72b1e465b314971febc088cf607037232938",
4646
"blockNumber": 5415091,
47-
"error": "bad instruction",
47+
"error": "invalid opcode: INVALID",
4848
"result": null,
4949
"subtraces": 0,
5050
"traceAddress": [],
2 Bytes
Binary file not shown.
13 Bytes
Binary file not shown.

integration/run_tests.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,12 @@
8484
"mainnet/debug_traceCall/test_08.tar", # diff on gasCost
8585
"mainnet/debug_traceCall/test_10.tar", # diff on gasCost
8686

87-
"mainnet/trace_block/test_01.json", # diff on error message
88-
"mainnet/trace_block/test_03.json", # diff on error message
87+
"mainnet/trace_block/test_01.json", # diff on action
8988
"mainnet/trace_block/test_04.tar", # diff on gasCost
9089
"mainnet/trace_block/test_05.tar", # diff on gasCost
9190
"mainnet/trace_block/test_06.tar", # diff on rewardType and author
92-
"mainnet/trace_block/test_15.tar", # diff on error message
91+
"mainnet/trace_block/test_15.tar", # diff on call
9392
"mainnet/trace_block/test_17.tar", # diff on rewardType and author
94-
"mainnet/trace_block/test_18.tar", # diff on error message
9593
"mainnet/trace_block/test_19.tar", # diff on gasCost
9694
"mainnet/trace_block/test_20.tar" # diff on callType
9795
]
@@ -539,10 +537,10 @@ def dump_jsons(dump_json, silk_file, exp_rsp_file, output_dir, response, expecte
539537
os.mkdir(output_dir)
540538
if silk_file != "":
541539
with open(silk_file, 'w', encoding='utf8') as json_file_ptr:
542-
json_file_ptr.write(json.dumps(response, indent=6, sort_keys=True))
540+
json_file_ptr.write(json.dumps(response, indent=2, sort_keys=True))
543541
if exp_rsp_file != "":
544542
with open(exp_rsp_file, 'w', encoding='utf8') as json_file_ptr:
545-
json_file_ptr.write(json.dumps(expected_response, indent=5, sort_keys=True))
543+
json_file_ptr.write(json.dumps(expected_response, indent=2, sort_keys=True))
546544

547545

548546
def execute_request(transport_type: str, jwt_auth, encoded, request_dumps, target: str, verbose_level: int, compression: bool):

0 commit comments

Comments
 (0)