Skip to content

Commit

Permalink
Revert to using a separate variable for the onblock trace.
Browse files Browse the repository at this point in the history
  • Loading branch information
greg7mdp committed May 7, 2024
1 parent 9a81911 commit a5271c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion libraries/testing/include/eosio/testing/tester.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ namespace eosio::testing {

struct produce_block_result_t {
signed_block_ptr block;
std::vector<transaction_trace_ptr> traces; // onblock trace first, followed by transaction traces
transaction_trace_ptr onblock_trace;
std::vector<transaction_trace_ptr> traces; // transaction traces
};

/**
Expand Down
4 changes: 2 additions & 2 deletions libraries/testing/tester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,9 @@ namespace eosio::testing {
static transaction_trace_ptr onblock_trace;

if( !control->is_building_block() || control->pending_block_time() != next_time ) {
res.traces.emplace_back(_start_block( next_time ));
res.onblock_trace = _start_block( next_time );
} else {
res.traces.emplace_back(std::move(onblock_trace)); // saved from _start_block call in last _produce_block
res.onblock_trace = std::move(onblock_trace); // saved from _start_block call in last _produce_block
}

if( !skip_pending_trxs ) {
Expand Down

0 comments on commit a5271c4

Please sign in to comment.