From 8ad088ab75e4781cebda0b5f2dd7d80d6dc12d0a Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Wed, 17 Feb 2016 21:53:55 +0300 Subject: [PATCH] Add few more debug messages for masternode category --- src/masternodeman.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp index 215cdc71e..8c2fffcfc 100644 --- a/src/masternodeman.cpp +++ b/src/masternodeman.cpp @@ -686,18 +686,24 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData CMasternodeBroadcast mnb; vRecv >> mnb; + LogPrint("masternode", "mnb - Masternode broadcast, vin: %s\n", mnb.vin.ToString()); + if(mapSeenMasternodeBroadcast.count(mnb.GetHash())) { //seen masternodeSync.AddedMasternodeList(mnb.GetHash()); return; } mapSeenMasternodeBroadcast.insert(make_pair(mnb.GetHash(), mnb)); + LogPrint("masternode", "mnb - Masternode broadcast, vin: %s new\n", mnb.vin.ToString()); + int nDoS = 0; if(!mnb.CheckAndUpdate(nDoS)){ if(nDoS > 0) Misbehaving(pfrom->GetId(), nDoS); + LogPrint("masternode", "mnb - Masternode broadcast, vin: %s CheckAndUpdate failed\n", mnb.vin.ToString()); + //failed return; } @@ -733,6 +739,8 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData if(mapSeenMasternodePing.count(mnp.GetHash())) return; //seen mapSeenMasternodePing.insert(make_pair(mnp.GetHash(), mnp)); + LogPrint("masternode", "mnp - Masternode ping, vin: %s\n new", mnp.vin.ToString()); + int nDoS = 0; if(mnp.CheckAndUpdate(nDoS)) return; @@ -755,6 +763,8 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData CTxIn vin; vRecv >> vin; + LogPrint("masternode", "dseg - Masternode list, vin: %s\n", vin.ToString()); + if(vin == CTxIn()) { //only should ask for this once //local network bool isLocal = (pfrom->addr.IsRFC1918() || pfrom->addr.IsLocal());