only bump nTimeLast* when valid new/updated message arrived, do not bump on invalid or 'seen'
This commit is contained in:
parent
cfeda84a3c
commit
cc3b3a145e
@ -140,7 +140,6 @@ void CGovernanceManager::ProcessMessage(CNode* pfrom, std::string& strCommand, C
|
||||
|
||||
if(mapSeenGovernanceObjects.count(govobj.GetHash())){
|
||||
// TODO - print error code? what if it's GOVOBJ_ERROR_IMMATURE?
|
||||
masternodeSync.AddedBudgetItem(govobj.GetHash());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -189,10 +188,7 @@ void CGovernanceManager::ProcessMessage(CNode* pfrom, std::string& strCommand, C
|
||||
|
||||
// IF WE'VE SEEN THIS OBJECT THEN SKIP
|
||||
|
||||
if(mapSeenVotes.count(vote.GetHash())){
|
||||
masternodeSync.AddedBudgetItem(vote.GetHash());
|
||||
return;
|
||||
}
|
||||
if(mapSeenVotes.count(vote.GetHash())) return;
|
||||
|
||||
// FIND THE MASTERNODE OF THE VOTER
|
||||
|
||||
|
@ -316,7 +316,6 @@ void CMasternodePayments::ProcessMessage(CNode* pfrom, std::string& strCommand,
|
||||
|
||||
if(mapMasternodePaymentVotes.count(vote.GetHash())) {
|
||||
LogPrint("mnpayments", "MASTERNODEPAYMENTVOTE -- hash=%s, nHeight=%d seen\n", vote.GetHash().ToString(), pCurrentBlockIndex->nHeight);
|
||||
masternodeSync.AddedPaymentVote();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -701,7 +701,6 @@ int CMasternodeMan::GetEstimatedMasternodes(int nBlock)
|
||||
void CMasternodeMan::UpdateMasternodeList(CMasternodeBroadcast mnb) {
|
||||
mapSeenMasternodePing.insert(make_pair(mnb.lastPing.GetHash(), mnb.lastPing));
|
||||
mapSeenMasternodeBroadcast.insert(make_pair(mnb.GetHash(), mnb));
|
||||
masternodeSync.AddedMasternodeList();
|
||||
|
||||
LogPrintf("CMasternodeMan::UpdateMasternodeList() - addr: %s\n vin: %s\n", mnb.addr.ToString(), mnb.vin.ToString());
|
||||
|
||||
@ -709,9 +708,11 @@ void CMasternodeMan::UpdateMasternodeList(CMasternodeBroadcast mnb) {
|
||||
if(pmn == NULL)
|
||||
{
|
||||
CMasternode mn(mnb);
|
||||
Add(mn);
|
||||
} else {
|
||||
pmn->UpdateFromNewBroadcast(mnb);
|
||||
if(Add(mn)) {
|
||||
masternodeSync.AddedMasternodeList();
|
||||
}
|
||||
} else if(pmn->UpdateFromNewBroadcast(mnb)) {
|
||||
masternodeSync.AddedMasternodeList();
|
||||
}
|
||||
}
|
||||
|
||||
@ -720,7 +721,6 @@ bool CMasternodeMan::CheckMnbAndUpdateMasternodeList(CMasternodeBroadcast mnb, i
|
||||
LogPrint("masternode", "CMasternodeMan::CheckMnbAndUpdateMasternodeList - Masternode broadcast, vin: %s\n", mnb.vin.ToString());
|
||||
|
||||
if(mapSeenMasternodeBroadcast.count(mnb.GetHash())) { //seen
|
||||
masternodeSync.AddedMasternodeList();
|
||||
return true;
|
||||
}
|
||||
mapSeenMasternodeBroadcast.insert(make_pair(mnb.GetHash(), mnb));
|
||||
|
Loading…
Reference in New Issue
Block a user