Add few more debug messages for masternode category

This commit is contained in:
UdjinM6 2016-02-17 21:53:55 +03:00
parent 6fc9b4c772
commit 8ad088ab75

View File

@ -686,18 +686,24 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
CMasternodeBroadcast mnb; CMasternodeBroadcast mnb;
vRecv >> mnb; vRecv >> mnb;
LogPrint("masternode", "mnb - Masternode broadcast, vin: %s\n", mnb.vin.ToString());
if(mapSeenMasternodeBroadcast.count(mnb.GetHash())) { //seen if(mapSeenMasternodeBroadcast.count(mnb.GetHash())) { //seen
masternodeSync.AddedMasternodeList(mnb.GetHash()); masternodeSync.AddedMasternodeList(mnb.GetHash());
return; return;
} }
mapSeenMasternodeBroadcast.insert(make_pair(mnb.GetHash(), mnb)); mapSeenMasternodeBroadcast.insert(make_pair(mnb.GetHash(), mnb));
LogPrint("masternode", "mnb - Masternode broadcast, vin: %s new\n", mnb.vin.ToString());
int nDoS = 0; int nDoS = 0;
if(!mnb.CheckAndUpdate(nDoS)){ if(!mnb.CheckAndUpdate(nDoS)){
if(nDoS > 0) if(nDoS > 0)
Misbehaving(pfrom->GetId(), nDoS); Misbehaving(pfrom->GetId(), nDoS);
LogPrint("masternode", "mnb - Masternode broadcast, vin: %s CheckAndUpdate failed\n", mnb.vin.ToString());
//failed //failed
return; return;
} }
@ -733,6 +739,8 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
if(mapSeenMasternodePing.count(mnp.GetHash())) return; //seen if(mapSeenMasternodePing.count(mnp.GetHash())) return; //seen
mapSeenMasternodePing.insert(make_pair(mnp.GetHash(), mnp)); mapSeenMasternodePing.insert(make_pair(mnp.GetHash(), mnp));
LogPrint("masternode", "mnp - Masternode ping, vin: %s\n new", mnp.vin.ToString());
int nDoS = 0; int nDoS = 0;
if(mnp.CheckAndUpdate(nDoS)) return; if(mnp.CheckAndUpdate(nDoS)) return;
@ -755,6 +763,8 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
CTxIn vin; CTxIn vin;
vRecv >> vin; vRecv >> vin;
LogPrint("masternode", "dseg - Masternode list, vin: %s\n", vin.ToString());
if(vin == CTxIn()) { //only should ask for this once if(vin == CTxIn()) { //only should ask for this once
//local network //local network
bool isLocal = (pfrom->addr.IsRFC1918() || pfrom->addr.IsLocal()); bool isLocal = (pfrom->addr.IsRFC1918() || pfrom->addr.IsLocal());