diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp index cb1a4ccd7..121028ffc 100644 --- a/src/activemasternode.cpp +++ b/src/activemasternode.cpp @@ -180,6 +180,12 @@ bool CActiveMasternode::SendMasternodePing(std::string& errorMessage) { pmn->lastPing = mnp; mnodeman.mapSeenMasternodePing.insert(make_pair(mnp.GetHash(), mnp)); + + //mnodeman.mapSeenMasternodeBroadcast.lastPing is probably outdated, so we'll update it + CMasternodeBroadcast mnb(*pmn); + uint256 hash = mnb.GetHash(); + if(mnodeman.mapSeenMasternodeBroadcast.count(hash)) mnodeman.mapSeenMasternodeBroadcast[hash].lastPing = mnp; + mnp.Relay(); /* diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp index 70c9e0ac4..01116dc6d 100644 --- a/src/masternodeman.cpp +++ b/src/masternodeman.cpp @@ -768,9 +768,13 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData if(mn.IsEnabled()) { LogPrint("masnernode", "dseg - Sending Masternode entry - %s \n", mn.addr.ToString()); if(vin == CTxIn() || vin == mn.vin){ - CInv inv(MSG_MASTERNODE_ANNOUNCE, CMasternodeBroadcast(mn).GetHash()); + CMasternodeBroadcast mnb = CMasternodeBroadcast(mn); + uint256 hash = mnb.GetHash(); + CInv inv(MSG_MASTERNODE_ANNOUNCE, hash); vInv.push_back(inv); + if(!mapSeenMasternodeBroadcast.count(hash)) mapSeenMasternodeBroadcast.insert(make_pair(hash, mnb)); + if(vin == mn.vin) { LogPrintf("dseg - Sent 1 Masternode entries to %s\n", pfrom->addr.ToString()); break;