@@ -27,9 +27,13 @@ void run_state_test(const StateTransitionTest& test, evmc::VM& vm, bool trace_su
27
27
const auto tx = test.multi_tx .get (expected.indexes );
28
28
auto state = test.pre_state ;
29
29
30
+ const auto start_time = std::chrono::steady_clock::now ();
31
+
30
32
const auto res = state::transition (state, test.block , tx, rev, vm, test.block .gas_limit ,
31
33
state::BlockInfo::MAX_BLOB_GAS_PER_BLOCK);
32
34
35
+ const auto exec_duration = std::chrono::steady_clock::now () - start_time;
36
+
33
37
// Finalize block with reward 0.
34
38
state::finalize (state, rev, test.block .coinbase , 0 , {}, {});
35
39
@@ -46,8 +50,22 @@ void run_state_test(const StateTransitionTest& test, evmc::VM& vm, bool trace_su
46
50
else
47
51
std::clog << R"( "pass":false,"error":")" << r.status << ' "' ;
48
52
std::clog << R"( ,"gasUsed":"0x)" << std::hex << r.gas_used << R"( ",)" ;
53
+
54
+ if (r.status == EVMC_SUCCESS)
55
+ {
56
+ std::clog << " LOGS:\n " ;
57
+ for (const auto & log : r.logs )
58
+ {
59
+ std::clog << log .addr << " : " << hex (log .data ) << " \n " ;
60
+ }
61
+ }
49
62
}
50
63
std::clog << R"( "stateRoot":"0x)" << hex (state_root) << " \" }\n " ;
64
+
65
+ std::clog
66
+ << " time: " << std::dec
67
+ << std::chrono::duration_cast<std::chrono::microseconds>(exec_duration).count ()
68
+ << " us\n " ;
51
69
}
52
70
53
71
if (expected.exception )
0 commit comments