Fix CMasternodeMan::ProcessVerify* logs (#1782)

Fixes these issues:
- wrong function name
- wrong addr
- too spammy
- typo
This commit is contained in:
UdjinM6 2017-12-14 19:50:06 +03:00 committed by GitHub
parent 63e3061487
commit 86e6f0dd23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1200,10 +1200,11 @@ void CMasternodeMan::ProcessVerifyReply(CNode* pnode, CMasternodeVerification& m
// increase ban score for everyone else // increase ban score for everyone else
BOOST_FOREACH(CMasternode* pmn, vpMasternodesToBan) { BOOST_FOREACH(CMasternode* pmn, vpMasternodesToBan) {
pmn->IncreasePoSeBanScore(); pmn->IncreasePoSeBanScore();
LogPrint("masternode", "CMasternodeMan::ProcessVerifyBroadcast -- increased PoSe ban score for %s addr %s, new score %d\n", LogPrint("masternode", "CMasternodeMan::ProcessVerifyReply -- increased PoSe ban score for %s addr %s, new score %d\n",
prealMasternode->vin.prevout.ToStringShort(), pnode->addr.ToString(), pmn->nPoSeBanScore); prealMasternode->vin.prevout.ToStringShort(), pnode->addr.ToString(), pmn->nPoSeBanScore);
} }
LogPrintf("CMasternodeMan::ProcessVerifyBroadcast -- PoSe score increased for %d fake masternodes, addr %s\n", if(!vpMasternodesToBan.empty())
LogPrintf("CMasternodeMan::ProcessVerifyReply -- PoSe score increased for %d fake masternodes, addr %s\n",
(int)vpMasternodesToBan.size(), pnode->addr.ToString()); (int)vpMasternodesToBan.size(), pnode->addr.ToString());
} }
} }
@ -1275,7 +1276,7 @@ void CMasternodeMan::ProcessVerifyBroadcast(CNode* pnode, const CMasternodeVerif
} }
if(pmn1->addr != mnv.addr) { if(pmn1->addr != mnv.addr) {
LogPrintf("CMasternodeMan::ProcessVerifyBroadcast -- addr %s do not match %s\n", mnv.addr.ToString(), pnode->addr.ToString()); LogPrintf("CMasternodeMan::ProcessVerifyBroadcast -- addr %s does not match %s\n", mnv.addr.ToString(), pmn1->addr.ToString());
return; return;
} }
@ -1295,7 +1296,7 @@ void CMasternodeMan::ProcessVerifyBroadcast(CNode* pnode, const CMasternodeVerif
mnv.Relay(); mnv.Relay();
LogPrintf("CMasternodeMan::ProcessVerifyBroadcast -- verified masternode %s for addr %s\n", LogPrintf("CMasternodeMan::ProcessVerifyBroadcast -- verified masternode %s for addr %s\n",
pmn1->vin.prevout.ToStringShort(), pnode->addr.ToString()); pmn1->vin.prevout.ToStringShort(), pmn1->addr.ToString());
// increase ban score for everyone else with the same addr // increase ban score for everyone else with the same addr
int nCount = 0; int nCount = 0;
@ -1306,8 +1307,9 @@ void CMasternodeMan::ProcessVerifyBroadcast(CNode* pnode, const CMasternodeVerif
LogPrint("masternode", "CMasternodeMan::ProcessVerifyBroadcast -- increased PoSe ban score for %s addr %s, new score %d\n", LogPrint("masternode", "CMasternodeMan::ProcessVerifyBroadcast -- increased PoSe ban score for %s addr %s, new score %d\n",
mnpair.first.ToStringShort(), mnpair.second.addr.ToString(), mnpair.second.nPoSeBanScore); mnpair.first.ToStringShort(), mnpair.second.addr.ToString(), mnpair.second.nPoSeBanScore);
} }
LogPrintf("CMasternodeMan::ProcessVerifyBroadcast -- PoSe score incresed for %d fake masternodes, addr %s\n", if(nCount)
nCount, pnode->addr.ToString()); LogPrintf("CMasternodeMan::ProcessVerifyBroadcast -- PoSe score increased for %d fake masternodes, addr %s\n",
nCount, pmn1->addr.ToString());
} }
} }