diff options
author | stoffu <stoffu@protonmail.ch> | 2018-03-30 19:19:41 +0900 |
---|---|---|
committer | stoffu <stoffu@protonmail.ch> | 2018-03-30 19:22:32 +0900 |
commit | 66a659bb0353b51382054f14db9d84cf108799c0 (patch) | |
tree | af60dfe00bd1494279a5fc13b9979820e837a516 /src | |
parent | Merge pull request #3434 (diff) | |
download | monero-66a659bb0353b51382054f14db9d84cf108799c0.tar.xz |
blockchain: add scope guard to waiter for threaded txv1 verification
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 3db516847..2691e3db9 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -2658,6 +2658,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) |