From c7b6117debf4ebabc464a55b840bdd7bdeb94fa3 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Thu, 14 Aug 2014 12:32:34 -0400 Subject: Create new signal for notification of new blocks. Use w/ -blocknotify --- src/main.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index e73942d7e0..841cc1952f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2162,16 +2162,14 @@ bool ActivateBestChain(CValidationState &state) { uint256 hashNewTip = pindexNewTip->GetBlockHash(); // Relay inventory, but don't relay old inventory during initial block download. int nBlockEstimate = Checkpoints::GetTotalBlocksEstimate(); + { LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodes) if (chainActive.Height() > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate)) pnode->PushInventory(CInv(MSG_BLOCK, hashNewTip)); - - std::string strCmd = GetArg("-blocknotify", ""); - if (!strCmd.empty()) { - boost::replace_all(strCmd, "%s", hashNewTip.GetHex()); - boost::thread t(runCommand, strCmd); // thread runs free } + + uiInterface.NotifyBlockTip(hashNewTip); } } while(pindexMostWork != chainActive.Tip()); -- cgit v1.2.3