From 84f4657ff9064ccf32a66b4ad3101271d2c4a0a4 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Wed, 4 Mar 2015 22:04:02 +0300 Subject: [PATCH] Prevent masternodes with protocol less then nMasternodeMinProtocol (set to MIN_PEER_PROTO_VERSION by default now) to be able to stay in masternode list. Scenario: MIN_PEER_PROTO_VERSION was bumped but because we remember masternode we will never ask it for dsee again. --- src/init.cpp | 2 +- src/masternodeman.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 939f58df38..774d6342f4 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -707,7 +707,7 @@ bool AppInit2(boost::thread_group& threadGroup) } //ignore masternodes below protocol version - nMasternodeMinProtocol = GetArg("-masternodeminprotocol", 70051); + nMasternodeMinProtocol = GetArg("-masternodeminprotocol", MIN_PEER_PROTO_VERSION); int64_t nStart; diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp index 2ea99be716..6150ac00d8 100644 --- a/src/masternodeman.cpp +++ b/src/masternodeman.cpp @@ -626,7 +626,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData // see if we have this masternode CMasternode* pmn = this->Find(vin); - if(pmn != NULL) + if(pmn != NULL && pmn->protocolVersion >= nMasternodeMinProtocol) { // LogPrintf("dseep - Found corresponding mn for vin: %s\n", vin.ToString().c_str()); // take this only if it's newer