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:
parent
385c532df8
commit
71e074336b
@ -2236,7 +2236,7 @@ void ThreadCheckDarkSendPool()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//try to sync the masternode list and payment list every 5 seconds from at least 3 nodes
|
//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();
|
bool fIsInitialDownload = IsInitialBlockDownload();
|
||||||
if(!fIsInitialDownload) {
|
if(!fIsInitialDownload) {
|
||||||
LOCK(cs_vNodes);
|
LOCK(cs_vNodes);
|
||||||
|
@ -273,13 +273,13 @@ 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(), 20);
|
Misbehaving(pfrom->GetId(), 34);
|
||||||
LogPrintf("dseg - peer already asked me for the list\n");
|
LogPrintf("dseg - peer already asked me for the list\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t askAgain = GetTime()+(60*60*24);
|
int64_t askAgain = GetTime()+(60*60*3);
|
||||||
askedForMasternodeList[pfrom->addr] = askAgain;
|
askedForMasternodeList[pfrom->addr] = askAgain;
|
||||||
}
|
}
|
||||||
} //else, asking for a specific node which is ok
|
} //else, asking for a specific node which is ok
|
||||||
|
Loading…
Reference in New Issue
Block a user