Merge pull request #3525

66a659b blockchain: add scope guard to waiter for threaded txv1 verification (stoffu)
This commit is contained in:
luigi1111 2018-05-30 16:08:50 -05:00
commit 9bc8f76924
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

View File

@ -2719,6 +2719,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)