mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-27 16:05:39 +01:00
Fix csBestBlock/cvBlockChange waiting in rpc/mining
This commit is contained in:
@@ -471,7 +471,7 @@ UniValue getblocktemplate(const JSONRPCRequest& request)
|
||||
checktxtime = std::chrono::steady_clock::now() + std::chrono::minutes(1);
|
||||
|
||||
WaitableLock lock(csBestBlock);
|
||||
while (chainActive.Tip()->GetBlockHash() == hashWatchedChain && IsRPCRunning())
|
||||
while (hashBestBlock == hashWatchedChain && IsRPCRunning())
|
||||
{
|
||||
if (cvBlockChange.wait_until(lock, checktxtime) == std::cv_status::timeout)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user