From 83bfe74f6551a9ea74174bf2148073b21bc6b847 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sun, 6 Mar 2016 18:01:52 +0300 Subject: [PATCH] Fix initial call of UpdatedBlockTip --- src/init.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index f5225746e8886..850572659bb96 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -36,6 +36,7 @@ #include "activemasternode.h" #include "masternode-budget.h" #include "masternode-payments.h" +#include "masternode-sync.h" #include "masternodeman.h" #include "masternodeconfig.h" #include "spork.h" @@ -1953,7 +1954,12 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) darkSendPool.InitCollateralAddress(); // force UpdatedBlockTip to initialize pCurrentBlockIndex for DS, MN payments and budgets - GetMainSignals().UpdatedBlockTip(chainActive.Tip()); + // but don't call it directly to prevent triggering of other listeners like zmq etc. + // GetMainSignals().UpdatedBlockTip(chainActive.Tip()); + darkSendPool.UpdatedBlockTip(chainActive.Tip()); + mnpayments.UpdatedBlockTip(chainActive.Tip()); + budget.UpdatedBlockTip(chainActive.Tip()); + masternodeSync.UpdatedBlockTip(chainActive.Tip()); // start dash-darksend thread threadGroup.create_thread(boost::bind(&ThreadCheckDarkSendPool));