Permalink
Browse files

Add scope guard to waiter for threaded txv1 verification

  • Loading branch information...
miltonf committed Jan 9, 2019
1 parent e4d8ee3 commit f7dad8fc379dc0f256a0360cf9164b6776bcf9f5
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/cryptonote_core/blockchain.cpp
@@ -2708,6 +2708,7 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,

tools::threadpool& tpool = tools::threadpool::getInstance();
tools::threadpool::waiter waiter;
const auto waiter_guard = epee::misc_utils::create_scope_leave_handler([&]() { waiter.wait(); });
int threads = tpool.get_max_concurrency();

for (const auto& txin : tx.vin)

0 comments on commit f7dad8f

Please sign in to comment.