Merge pull request #127 from UdjinM6/fix_dseg

fix dseg messaging / banning issues
This commit is contained in:
Darkcoin 2015-01-21 17:29:10 -07:00
commit 90858632ec
2 changed files with 4 additions and 4 deletions

View File

@ -2228,8 +2228,8 @@ void ThreadCheckDarkSendPool()
CleanTransactionLocksList(); CleanTransactionLocksList();
} }
//try to sync the masternode list and payment list every 20 seconds //try to sync the masternode list and payment list every 5 seconds from at least 3 nodes
if(c % 5 == 0 && RequestedMasterNodeList <= 2){ if(c % 5 == 0 && (RequestedMasterNodeList <= 2 || vecMasternodes.size() == 0)){
bool fIsInitialDownload = IsInitialBlockDownload(); bool fIsInitialDownload = IsInitialBlockDownload();
if(!fIsInitialDownload) { if(!fIsInitialDownload) {
LOCK(cs_vNodes); LOCK(cs_vNodes);

View File

@ -273,7 +273,7 @@ void ProcessMessageMasternode(CNode* pfrom, std::string& strCommand, CDataStream
{ {
int64_t t = (*i).second; int64_t t = (*i).second;
if (GetTime() < t) { if (GetTime() < t) {
Misbehaving(pfrom->GetId(), 100); Misbehaving(pfrom->GetId(), 20);
LogPrintf("dseg - peer already asked me for the list\n"); LogPrintf("dseg - peer already asked me for the list\n");
return; return;
} }
@ -284,7 +284,7 @@ void ProcessMessageMasternode(CNode* pfrom, std::string& strCommand, CDataStream
} }
} //else, asking for a specific node which is ok } //else, asking for a specific node which is ok
int count = vecMasternodes.size()-1; int count = vecMasternodes.size();
int i = 0; int i = 0;
BOOST_FOREACH(CMasterNode mn, vecMasternodes) { BOOST_FOREACH(CMasterNode mn, vecMasternodes) {