Skip to content

Commit

Permalink
Fix initial call of UpdatedBlockTip
Browse files Browse the repository at this point in the history
Closes #718
  • Loading branch information
UdjinM6 authored and schinzelh committed Mar 6, 2016
1 parent af1c321 commit 3cf048d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 3cf048d

Please sign in to comment.