Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix for transaction_traces store in mongo_db_plugin #6130

Merged
merged 2 commits into from
Oct 24, 2018

Conversation

heifner
Copy link
Contributor

@heifner heifner commented Oct 24, 2018

Change Description

  • transaction_traces were not stored if action_traces were not stored
  • Now transaction_traces are stored if enabled even if action_trace storage is disabled
  • Filtering is applied to transaction_traces even if action_trace storage is disabled

Resolves #6088

@@ -809,8 +811,10 @@ mongo_db_plugin_impl::add_action_trace( mongocxx::bulk_write& bulk_action_traces
}

bool added = false;
if( start_block_reached && store_action_traces &&
filter_include( atrace.receipt.receiver, atrace.act.name, atrace.act.authorization ) ) {
bool in_filter = (store_action_traces || store_transaction_traces) && start_block_reached &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer const bool in_filter since nothing else is changing

@@ -799,7 +800,8 @@ void mongo_db_plugin_impl::_process_accepted_transaction( const chain::transacti
bool
mongo_db_plugin_impl::add_action_trace( mongocxx::bulk_write& bulk_action_traces, const chain::action_trace& atrace,
const chain::transaction_trace_ptr& t,
bool executed, const std::chrono::milliseconds& now )
bool executed, const std::chrono::milliseconds& now,
bool& write_ttrace )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what to do with it, but would like to point out that returning write_atrace (essentially) and setting a reference for write_ttrace doesn't make for a clear interface.

@heifner heifner merged commit 7145ded into release/1.4.x Oct 24, 2018
@heifner heifner deleted the gh#6088-transaction-traces branch October 24, 2018 17:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants