Merge pull request #635 from thelazier/fix_misbehaving_count_mnsync
Preventing some Misbehaving counting during Masternode Sync
This commit is contained in:
commit
e6d842f38d
@ -956,7 +956,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
|
|||||||
mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
|
mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
|
||||||
if(!vote.SignatureValid(true)){
|
if(!vote.SignatureValid(true)){
|
||||||
LogPrintf("mvote - signature invalid\n");
|
LogPrintf("mvote - signature invalid\n");
|
||||||
Misbehaving(pfrom->GetId(), 20);
|
if(masternodeSync.IsSynced()) Misbehaving(pfrom->GetId(), 20);
|
||||||
// it could just be a non-synced masternode
|
// it could just be a non-synced masternode
|
||||||
mnodeman.AskForMN(pfrom, vote.vin);
|
mnodeman.AskForMN(pfrom, vote.vin);
|
||||||
return;
|
return;
|
||||||
@ -1026,7 +1026,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
|
|||||||
mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
|
mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
|
||||||
if(!vote.SignatureValid(true)){
|
if(!vote.SignatureValid(true)){
|
||||||
LogPrintf("fbvote - signature invalid\n");
|
LogPrintf("fbvote - signature invalid\n");
|
||||||
Misbehaving(pfrom->GetId(), 20);
|
if(masternodeSync.IsSynced()) Misbehaving(pfrom->GetId(), 20);
|
||||||
// it could just be a non-synced masternode
|
// it could just be a non-synced masternode
|
||||||
mnodeman.AskForMN(pfrom, vote.vin);
|
mnodeman.AskForMN(pfrom, vote.vin);
|
||||||
return;
|
return;
|
||||||
|
@ -394,7 +394,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
|
|||||||
|
|
||||||
if(!winner.SignatureValid()){
|
if(!winner.SignatureValid()){
|
||||||
LogPrintf("mnw - invalid signature\n");
|
LogPrintf("mnw - invalid signature\n");
|
||||||
Misbehaving(pfrom->GetId(), 20);
|
if(masternodeSync.IsSynced()) Misbehaving(pfrom->GetId(), 20);
|
||||||
// it could just be a non-synced masternode
|
// it could just be a non-synced masternode
|
||||||
mnodeman.AskForMN(pfrom, winner.vinMasternode);
|
mnodeman.AskForMN(pfrom, winner.vinMasternode);
|
||||||
return;
|
return;
|
||||||
@ -656,7 +656,7 @@ bool CMasternodePaymentWinner::IsValid(CNode* pnode, std::string& strError)
|
|||||||
{
|
{
|
||||||
strError = strprintf("Masternode not in the top %d (%d)", MNPAYMENTS_SIGNATURES_TOTAL, n);
|
strError = strprintf("Masternode not in the top %d (%d)", MNPAYMENTS_SIGNATURES_TOTAL, n);
|
||||||
LogPrintf("CMasternodePaymentWinner::IsValid - %s\n", strError);
|
LogPrintf("CMasternodePaymentWinner::IsValid - %s\n", strError);
|
||||||
Misbehaving(pnode->GetId(), 20);
|
if(masternodeSync.IsSynced()) Misbehaving(pnode->GetId(), 20);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user