aboutsummaryrefslogtreecommitdiff
path: root/src/zmq
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2016-09-30 17:40:03 -0400
committerMatt Corallo <git@bluematt.me>2016-10-04 12:35:07 -0400
commit87e7d7280739cccfabaffbbfbbbcfa21e943da3a (patch)
tree07cbce45120a9da86345716213c2203b65e250d8 /src/zmq
parenta7e5cbb209d4aeb8c2e4c58c92bf214759998056 (diff)
Make validationinterface.UpdatedBlockTip more verbose
In anticipation of making all the callbacks out of block processing flow through it. Note that vHashes will always have something in it since pindexFork != pindexNewTip.
Diffstat (limited to 'src/zmq')
-rw-r--r--src/zmq/zmqnotificationinterface.cpp7
-rw-r--r--src/zmq/zmqnotificationinterface.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/zmq/zmqnotificationinterface.cpp b/src/zmq/zmqnotificationinterface.cpp
index 376e7dec59..020cdfbdc7 100644
--- a/src/zmq/zmqnotificationinterface.cpp
+++ b/src/zmq/zmqnotificationinterface.cpp
@@ -124,12 +124,15 @@ void CZMQNotificationInterface::Shutdown()
}
}
-void CZMQNotificationInterface::UpdatedBlockTip(const CBlockIndex *pindex)
+void CZMQNotificationInterface::UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload)
{
+ if (fInitialDownload)
+ return;
+
for (std::list<CZMQAbstractNotifier*>::iterator i = notifiers.begin(); i!=notifiers.end(); )
{
CZMQAbstractNotifier *notifier = *i;
- if (notifier->NotifyBlock(pindex))
+ if (notifier->NotifyBlock(pindexNew))
{
i++;
}
diff --git a/src/zmq/zmqnotificationinterface.h b/src/zmq/zmqnotificationinterface.h
index a853447267..037470ec17 100644
--- a/src/zmq/zmqnotificationinterface.h
+++ b/src/zmq/zmqnotificationinterface.h
@@ -25,7 +25,7 @@ protected:
// CValidationInterface
void SyncTransaction(const CTransaction& tx, const CBlockIndex *pindex, int posInBlock);
- void UpdatedBlockTip(const CBlockIndex *pindex);
+ void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload);
private:
CZMQNotificationInterface();