aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2015-11-30 12:58:01 +0100
committerWladimir J. van der Laan <[email protected]>2015-11-30 13:04:29 +0100
commit96b802510da0750aabc4f3ba6750cb5ce76f2b8c (patch)
tree3374e1ba583bf511745c2cd4c02ff6ecb6d3cc8b /src/init.cpp
parentMerge pull request #7103 (diff)
parentMove uiInterface.NotifyBlockTip signal above the core/wallet signal (diff)
downloaddiscoin-96b802510da0750aabc4f3ba6750cb5ce76f2b8c.tar.xz
discoin-96b802510da0750aabc4f3ba6750cb5ce76f2b8c.zip
Merge pull request #7112
9af5f9c Move uiInterface.NotifyBlockTip signal above the core/wallet signal - This will keep getbestblockhash more in sync with blocknotify callbacks (Jonas Schnelli) 4082e46 [Qt] call GuessVerificationProgress synchronous during core signal, pass double over UI signal (Jonas Schnelli) 947d20b [Qt] reduce cs_main in getVerificationProgress() (Jonas Schnelli) e6d50fc [Qt] update block tip (height and date) without locking cs_main, update always (each block) (Jonas Schnelli) 012fc91 NotifyBlockTip signal: switch from hash (uint256) to CBlockIndex* - also adds a boolean for indication if the tip update was happening during initial sync - emit notification also during initial sync (Jonas Schnelli)
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 191c2ed8a..e6ce3d7b5 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -515,11 +515,14 @@ std::string LicenseInfo()
"\n";
}
-static void BlockNotifyCallback(const uint256& hashNewTip)
+static void BlockNotifyCallback(bool initialSync, const CBlockIndex *pBlockIndex)
{
+ if (initialSync || !pBlockIndex)
+ return;
+
std::string strCmd = GetArg("-blocknotify", "");
- boost::replace_all(strCmd, "%s", hashNewTip.GetHex());
+ boost::replace_all(strCmd, "%s", pBlockIndex->GetBlockHash().GetHex());
boost::thread t(runCommand, strCmd); // thread runs free
}