Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move log line for onblock and update saved log file for tests #1183

Merged
merged 3 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,13 @@ struct controller_impl {
}
}

void dmlog_applied_transaction(const transaction_trace_ptr& t) {
void dmlog_applied_transaction(const transaction_trace_ptr& t, const signed_transaction *trx = nullptr) {
linh2931 marked this conversation as resolved.
Show resolved Hide resolved
// dmlog_applied_transaction is called by push_scheduled_transaction
// where transient transactions are not possible, and by push_transaction
// only when the transaction is not transient
if (auto dm_logger = get_deep_mind_logger(false)) {
if (trx && !trx->actions.empty() && trx->actions[0].name == "onblock"_n)
heifner marked this conversation as resolved.
Show resolved Hide resolved
dm_logger->on_onblock(*trx);
dm_logger->on_applied_transaction(self.head_block_num() + 1, t);
}
}
Expand Down Expand Up @@ -1627,7 +1629,7 @@ struct controller_impl {
emit(self.accepted_transaction, trx);
}

dmlog_applied_transaction(trace);
dmlog_applied_transaction(trace, &trx->packed_trx()->get_signed_transaction());
heifner marked this conversation as resolved.
Show resolved Hide resolved
emit(self.applied_transaction, std::tie(trace, trx->packed_trx()));
}
}
Expand Down Expand Up @@ -2665,11 +2667,6 @@ struct controller_impl {
trx.set_reference_block( self.head_block_id() );
}

// onblock transaction cannot be transient
if (auto dm_logger = get_deep_mind_logger(false)) {
dm_logger->on_onblock(trx);
}

return trx;
}

Expand Down
Loading