diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp index c83dd8737..977a37487 100644 --- a/src/masternodeman.cpp +++ b/src/masternodeman.cpp @@ -167,7 +167,7 @@ void CMasternodeMan::Check() } } -void CMasternodeMan::CheckAndRemove(bool fForceExpiredRemoval) +void CMasternodeMan::CheckAndRemove() { LogPrintf("CMasternodeMan::CheckAndRemove\n"); @@ -182,9 +182,7 @@ void CMasternodeMan::CheckAndRemove(bool fForceExpiredRemoval) bool fRemove = // If it's marked to be removed from the list by CMasternode::Check for whatever reason ... (*it).nActiveState == CMasternode::MASTERNODE_REMOVE || // or collateral was spent ... - (*it).nActiveState == CMasternode::MASTERNODE_OUTPOINT_SPENT || - // or we were asked to remove exired entries ... - (fForceExpiredRemoval && (*it).nActiveState == CMasternode::MASTERNODE_EXPIRED); + (*it).nActiveState == CMasternode::MASTERNODE_OUTPOINT_SPENT; if (fRemove) { LogPrint("masternode", "CMasternodeMan::CheckAndRemove -- Removing Masternode: %s addr=%s %i now\n", (*it).GetStatus(), (*it).addr.ToString(), size() - 1); @@ -1235,21 +1233,6 @@ void CMasternodeMan::ProcessVerifyBroadcast(CNode* pnode, const CMasternodeVerif } } -void CMasternodeMan::Remove(CTxIn vin) -{ - LOCK(cs); - - std::vector::iterator it = vMasternodes.begin(); - while(it != vMasternodes.end()) { - if((*it).vin == vin) { - LogPrint("masternode", "CMasternodeMan::Remove -- Removing Masternode: %s addr=%s, %i now\n", vin.prevout.ToStringShort(), (*it).addr.ToString(), size() - 1); - vMasternodes.erase(it); - break; - } - ++it; - } -} - std::string CMasternodeMan::ToString() const { std::ostringstream info; diff --git a/src/masternodeman.h b/src/masternodeman.h index 398eee766..61c5c8144 100644 --- a/src/masternodeman.h +++ b/src/masternodeman.h @@ -194,7 +194,7 @@ public: void Check(); /// Check all Masternodes and remove inactive - void CheckAndRemove(bool fForceExpiredRemoval = false); + void CheckAndRemove(); /// Clear Masternode vector void Clear(); @@ -297,8 +297,6 @@ public: std::string ToString() const; - void Remove(CTxIn vin); - int GetEstimatedMasternodes(int nBlock); /// Update masternode list and maps using provided CMasternodeBroadcast