From 5dd052cae0fe6184be293f3f9d3928782b0bb1f1 Mon Sep 17 00:00:00 2001 From: furszy Date: Thu, 21 Oct 2021 23:51:07 -0300 Subject: [PATCH] tier two: do not request single missing mn entries until the initial sync process is completed. --- src/masternode-payments.cpp | 5 ++++- src/masternodeman.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp index 2c6aaf4e9f2ff..dc654760bcfee 100644 --- a/src/masternode-payments.cpp +++ b/src/masternode-payments.cpp @@ -498,7 +498,10 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st // If it's not a DMN, then it could be a non-synced MN. // Let's try to request the MN to the node. // (the AskForMN() will only broadcast it every 10 min). - mnodeman.AskForMN(pfrom, winner.vinMasternode); + + // But, only ask for missing items after the initial syncing process is complete + // otherwise will think a full sync succeeded when they return a result + if (pfrom && masternodeSync.IsSynced()) mnodeman.AskForMN(pfrom, winner.vinMasternode); } return; } diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp index 20804e34e1e92..e873bab752499 100644 --- a/src/masternodeman.cpp +++ b/src/masternodeman.cpp @@ -784,8 +784,10 @@ int CMasternodeMan::ProcessMNPing(CNode* pfrom, CMasternodePing& mnp) } // something significant is broken or mn is unknown, - // we might have to ask for a masternode entry once - AskForMN(pfrom, mnp.vin); + // we might have to ask for the mn entry (while we aren't syncing). + if (masternodeSync.IsSynced()) { + AskForMN(pfrom, mnp.vin); + } // All good return 0;