mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Don't switch to a dead ledger. Without this, we can even get out of sync with ourselves!
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user