From 0f1a1a6bbd992218f34550ae55e8def088f8e31b Mon Sep 17 00:00:00 2001 From: Evan Duffield Date: Fri, 9 May 2014 06:38:05 -0700 Subject: [PATCH] masternode bulk request only happens once --- src/main.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 31e04f9dbe..0f2ddd8e54 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -51,6 +51,7 @@ bool fImporting = false; bool fReindex = false; bool fBenchmark = false; bool fTxIndex = false; +bool fRequestedMasterNodeList = false; unsigned int nCoinCacheSize = 5000; // create DarkSend pools @@ -3877,8 +3878,14 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) // Change version pfrom->PushMessage("verack"); pfrom->ssSend.SetVersion(min(pfrom->nVersion, PROTOCOL_VERSION)); - - pfrom->PushMessage("dseg"); + + if(!fRequestedMasterNodeList) { + bool fIsInitialDownload = IsInitialBlockDownload(); + if(!fIsInitialDownload) { + pfrom->PushMessage("dseg"); + fRequestedMasterNodeList = true; + } + } if (!pfrom->fInbound) {