aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2018-03-20 21:04:27 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2018-04-03 21:53:27 -0700
commit45dd13503918e75a45ce33eb5c934b998790fdc8 (patch)
treed5febb2553c79a1dbedcfbf1eccc4c1ec99133a5 /src/rpc
parentad960f5771dc251c8e1198dd8a82e18df4562171 (diff)
Fix csBestBlock/cvBlockChange waiting in rpc/mining
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/mining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index 06882c0dfd..5a5ff06fe3 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -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)
{