Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/mining.cpp
Show First 20 Lines • Show All 570 Lines • ▼ Show 20 Lines | if (!lpval.isNull()) { | ||||
checktxtime = | checktxtime = | ||||
std::chrono::steady_clock::now() + std::chrono::minutes(1); | std::chrono::steady_clock::now() + std::chrono::minutes(1); | ||||
WAIT_LOCK(g_best_block_mutex, lock); | WAIT_LOCK(g_best_block_mutex, lock); | ||||
while (g_best_block == hashWatchedChain && IsRPCRunning()) { | while (g_best_block == hashWatchedChain && IsRPCRunning()) { | ||||
if (g_best_block_cv.wait_until(lock, checktxtime) == | if (g_best_block_cv.wait_until(lock, checktxtime) == | ||||
std::cv_status::timeout) { | std::cv_status::timeout) { | ||||
// Timeout: Check transactions for update | // Timeout: Check transactions for update | ||||
// without holding ::mempool.cs to avoid deadlocks | |||||
if (g_mempool.GetTransactionsUpdated() != | if (g_mempool.GetTransactionsUpdated() != | ||||
nTransactionsUpdatedLastLP) { | nTransactionsUpdatedLastLP) { | ||||
break; | break; | ||||
} | } | ||||
checktxtime += std::chrono::seconds(10); | checktxtime += std::chrono::seconds(10); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 306 Lines • Show Last 20 Lines |