aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-05-30 16:08:50 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-05-30 16:08:50 -0500
commit9bc8f76924adddcaec13e272d7e24e7458622f55 (patch)
tree4002f5078ef2ed9896cd06e954226c81ef3a44c1 /src
parentMerge pull request #3522 (diff)
parentblockchain: add scope guard to waiter for threaded txv1 verification (diff)
downloadmonero-9bc8f76924adddcaec13e272d7e24e7458622f55.tar.xz
Merge pull request #3525
66a659b blockchain: add scope guard to waiter for threaded txv1 verification (stoffu)
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_core/blockchain.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 0661b8409..54d8fac31 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -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)