mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
txpool: Make nTransactionsUpdated atomic
This commit is contained in:
@@ -480,6 +480,7 @@ static UniValue getblocktemplate(const JSONRPCRequest& request)
|
||||
if (g_best_block_cv.wait_until(lock, checktxtime) == std::cv_status::timeout)
|
||||
{
|
||||
// Timeout: Check transactions for update
|
||||
// without holding ::mempool.cs to avoid deadlocks
|
||||
if (mempool.GetTransactionsUpdated() != nTransactionsUpdatedLastLP)
|
||||
break;
|
||||
checktxtime += std::chrono::seconds(10);
|
||||
|
||||
Reference in New Issue
Block a user