Cleanups.

This commit is contained in:
JoelKatz
2012-06-19 05:30:07 -07:00
parent 117077a4a5
commit 7467407dfe
3 changed files with 5 additions and 9 deletions

View File

@@ -352,9 +352,7 @@ void ConnectionPool::peerDisconnected(Peer::pointer peer, const ipPort& ipPeer,
if (naPeer.isValid())
{
boost::unordered_map<NewcoinAddress, Peer::pointer>::iterator itCm;
itCm = mConnectedMap.find(naPeer);
boost::unordered_map<NewcoinAddress, Peer::pointer>::iterator itCm = mConnectedMap.find(naPeer);
if (itCm == mConnectedMap.end())
{
@@ -369,9 +367,7 @@ void ConnectionPool::peerDisconnected(Peer::pointer peer, const ipPort& ipPeer,
}
}
boost::unordered_map<ipPort, Peer::pointer>::iterator itIp;
itIp = mIpMap.find(ipPeer);
boost::unordered_map<ipPort, Peer::pointer>::iterator itIp = mIpMap.find(ipPeer);
if (itIp == mIpMap.end())
{

View File

@@ -370,10 +370,10 @@ bool LedgerAcquireMaster::hasLedger(const uint256& hash)
return mLedgers.find(hash) != mLedgers.end();
}
bool LedgerAcquireMaster::dropLedger(const uint256& hash)
void LedgerAcquireMaster::dropLedger(const uint256& hash)
{
boost::mutex::scoped_lock sl(mLock);
return mLedgers.erase(hash);
mLedgers.erase(hash);
}
bool LedgerAcquireMaster::gotLedgerData(newcoin::TMLedgerData& packet, Peer::pointer peer)

View File

@@ -128,7 +128,7 @@ public:
LedgerAcquire::pointer findCreate(const uint256& hash);
LedgerAcquire::pointer find(const uint256& hash);
bool hasLedger(const uint256& ledgerHash);
bool dropLedger(const uint256& ledgerHash);
void dropLedger(const uint256& ledgerHash);
bool gotLedgerData(newcoin::TMLedgerData& packet, Peer::pointer);
};