mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Small cleanups.
This commit is contained in:
@@ -166,15 +166,9 @@ void HashedObjectStore::bulkWrite()
|
|||||||
HashedObject::pointer HashedObjectStore::retrieve(const uint256& hash)
|
HashedObject::pointer HashedObjectStore::retrieve(const uint256& hash)
|
||||||
{
|
{
|
||||||
|
|
||||||
HashedObject::pointer obj;
|
HashedObject::pointer obj = mCache.fetch(hash);
|
||||||
{
|
if (obj)
|
||||||
obj = mCache.fetch(hash);
|
return obj;
|
||||||
if (obj)
|
|
||||||
{
|
|
||||||
// cLog(lsTRACE) << "HOS: " << hash << " fetch: incache";
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mNegativeCache.isPresent(hash))
|
if (mNegativeCache.isPresent(hash))
|
||||||
return obj;
|
return obj;
|
||||||
|
|||||||
@@ -504,10 +504,7 @@ Ledger::pointer Ledger::getSQL(const std::string& sql)
|
|||||||
ScopedLock sl(theApp->getLedgerDB()->getDBLock());
|
ScopedLock sl(theApp->getLedgerDB()->getDBLock());
|
||||||
|
|
||||||
if (!db->executeSQL(sql) || !db->startIterRows())
|
if (!db->executeSQL(sql) || !db->startIterRows())
|
||||||
{
|
|
||||||
cLog(lsDEBUG) << "No ledger for query: " << sql;
|
|
||||||
return Ledger::pointer();
|
return Ledger::pointer();
|
||||||
}
|
|
||||||
|
|
||||||
db->getStr("LedgerHash", hash);
|
db->getStr("LedgerHash", hash);
|
||||||
ledgerHash.SetHex(hash, true);
|
ledgerHash.SetHex(hash, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user