From 71e074336bdbf016eaee8f05ddcb6654fc3083b1 Mon Sep 17 00:00:00 2001 From: Evan Duffield Date: Mon, 26 Jan 2015 11:03:36 -0700 Subject: [PATCH] Update dseg limitations vecMasternodes.size() == 0 is a nearly impossible condition due to the behavior of dseep. Each time a node receives a ping where it's unaware of the masternode it will ask for the dsee from it's peer. - if(c % 5 == 0 && (RequestedMasterNodeList <= 2 || vecMasternodes.size() + if(c % 5 == 0 && RequestedMasterNodeList < 3){ --- src/darksend.cpp | 2 +- src/masternode.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/darksend.cpp b/src/darksend.cpp index 4787199331..bac8679164 100644 --- a/src/darksend.cpp +++ b/src/darksend.cpp @@ -2236,7 +2236,7 @@ void ThreadCheckDarkSendPool() } //try to sync the masternode list and payment list every 5 seconds from at least 3 nodes - if(c % 5 == 0 && (RequestedMasterNodeList <= 2 || vecMasternodes.size() == 0)){ + if(c % 5 == 0 && RequestedMasterNodeList < 3){ bool fIsInitialDownload = IsInitialBlockDownload(); if(!fIsInitialDownload) { LOCK(cs_vNodes); diff --git a/src/masternode.cpp b/src/masternode.cpp index 441de6a443..9706e77cd4 100644 --- a/src/masternode.cpp +++ b/src/masternode.cpp @@ -273,13 +273,13 @@ void ProcessMessageMasternode(CNode* pfrom, std::string& strCommand, CDataStream { int64_t t = (*i).second; if (GetTime() < t) { - Misbehaving(pfrom->GetId(), 20); + Misbehaving(pfrom->GetId(), 34); LogPrintf("dseg - peer already asked me for the list\n"); return; } } - int64_t askAgain = GetTime()+(60*60*24); + int64_t askAgain = GetTime()+(60*60*3); askedForMasternodeList[pfrom->addr] = askAgain; } } //else, asking for a specific node which is ok