Don't switch to a dead ledger. Without this, we can even get out of sync with ourselves!

This commit is contained in:
JoelKatz
2012-08-06 02:21:17 -07:00
parent b14b2f5dab
commit 39b28e1f50
3 changed files with 34 additions and 7 deletions

View File

@@ -172,6 +172,13 @@ boost::unordered_map<uint256, int> ValidationCollection::getCurrentValidations()
return ret;
}
void ValidationCollection::addDeadLedger(const uint256& ledger)
{
mDeadLedgers.push_back(ledger);
if (mDeadLedgers.size() >= 128)
mDeadLedgers.pop_front();
}
void ValidationCollection::flush()
{
boost::mutex::scoped_lock sl(mValidationLock);