mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Memory fixes.
This commit is contained in:
@@ -521,7 +521,7 @@ Ledger::pointer Ledger::getSQL(const std::string& sql)
|
||||
assert(false);
|
||||
return Ledger::pointer();
|
||||
}
|
||||
Log(lsDEBUG) << "Loaded ledger: " << ledgerHash;
|
||||
Log(lsTRACE) << "Loaded ledger: " << ledgerHash;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -745,7 +745,7 @@ void LedgerAcquireMaster::sweep()
|
||||
{
|
||||
if (it->second->getLastAction() > now)
|
||||
it->second->touch();
|
||||
else if ((it->second->getLastAction() + 500) < now)
|
||||
else if ((it->second->getLastAction() + 60) < now)
|
||||
mLedgers.erase(it++);
|
||||
else
|
||||
++it;
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
#include "Application.h"
|
||||
|
||||
#ifndef CACHED_LEDGER_NUM
|
||||
#define CACHED_LEDGER_NUM 128
|
||||
#define CACHED_LEDGER_NUM 64
|
||||
#endif
|
||||
|
||||
#ifndef CACHED_LEDGER_AGE
|
||||
#define CACHED_LEDGER_AGE 900
|
||||
#define CACHED_LEDGER_AGE 60
|
||||
#endif
|
||||
|
||||
// FIXME: Need to clean up ledgers by index at some point
|
||||
@@ -84,6 +84,7 @@ Ledger::pointer LedgerHistory::getLedgerByHash(const uint256& hash)
|
||||
if (!ret)
|
||||
return ret;
|
||||
assert(ret->getHash() == hash);
|
||||
mLedgersByHash.canonicalize(ret->getHash(), ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user