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

Commit

Permalink
Reference to shared_ptr can be invalidated by completion of push_tran…
Browse files Browse the repository at this point in the history
…saction. Create a local copy of transaction_metadata shared_ptr to keep alive until end of scope.
  • Loading branch information
heifner committed May 30, 2019
1 parent 4013720 commit f660beb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/producer_plugin/producer_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@ producer_plugin_impl::start_block_result producer_plugin_impl::start_block() {

if( preprocess_deadline <= fc::time_point::now() ) exhausted = true;
if( exhausted ) break;
const auto& trx = itr->second;
const transaction_metadata_ptr trx = itr->second;
auto category = calculate_transaction_category(trx);
if (category == tx_category::EXPIRED ||
(category == tx_category::UNEXPIRED_UNPERSISTED && _producers.empty()))
Expand Down

0 comments on commit f660beb

Please sign in to comment.