From dfb8dbbf61cf52b40f105d7a23bbdf383b5eaee5 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Tue, 31 Oct 2017 17:46:42 +0300 Subject: [PATCH] Fix mnp relay bug (#1700) * relay ping for nodes in ENABLED/EXPIRED/WATCHDOG_EXPIRED state only, skip everyone else * typo --- src/masternode.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/masternode.cpp b/src/masternode.cpp index 089ed8fc24..7841c39215 100644 --- a/src/masternode.cpp +++ b/src/masternode.cpp @@ -810,8 +810,10 @@ bool CMasternodePing::CheckAndUpdate(CMasternode* pmn, bool fFromNewBroadcast, i mnodeman.mapSeenMasternodeBroadcast[hash].second.lastPing = *this; } - pmn->Check(true); // force update, ignoring cache - if (!pmn->IsEnabled()) return false; + // force update, ignoring cache + pmn->Check(true); + // relay ping for nodes in ENABLED/EXPIRED/WATCHDOG_EXPIRED state only, skip everyone else + if (!pmn->IsEnabled() && !pmn->IsExpired() && !pmn->IsWatchdogExpired()) return false; LogPrint("masternode", "CMasternodePing::CheckAndUpdate -- Masternode ping acceepted and relayed, masternode=%s\n", vin.prevout.ToStringShort()); Relay(connman);