Get rid of "dead" ledgers. We don't need them any more and they make trouble.

Fix close time synch to be more accurate.
This commit is contained in:
JoelKatz
2012-09-05 21:55:00 -07:00
parent 8e5374b338
commit 687578abd9
4 changed files with 11 additions and 36 deletions

View File

@@ -164,28 +164,6 @@ boost::unordered_map<uint256, int> ValidationCollection::getCurrentValidations(u
return ret;
}
bool ValidationCollection::isDeadLedger(const uint256& ledger)
{
boost::mutex::scoped_lock sl(mValidationLock);
BOOST_FOREACH(const uint256& it, mDeadLedgers)
if (it == ledger)
return true;
return false;
}
void ValidationCollection::addDeadLedger(const uint256& ledger)
{
boost::mutex::scoped_lock sl(mValidationLock);
BOOST_FOREACH(const uint256& it, mDeadLedgers)
if (it == ledger)
return;
mDeadLedgers.push_back(ledger);
if (mDeadLedgers.size() >= 32)
mDeadLedgers.pop_front();
}
void ValidationCollection::flush()
{
boost::mutex::scoped_lock sl(mValidationLock);