mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user