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){
This commit is contained in:
Evan Duffield 2015-01-26 11:03:36 -07:00
parent 385c532df8
commit 71e074336b
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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