Remove unused CMasternodeMan method and argument

This commit is contained in:
Tim Flynn 2016-11-15 21:09:37 -05:00
parent 714f9a4f0d
commit 087d3d22df
2 changed files with 3 additions and 22 deletions

View File

@ -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<CMasternode>::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;

View File

@ -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