mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Cleanup.
This commit is contained in:
@@ -183,12 +183,13 @@ HashedObject::pointer HashedObjectStore::retrieve(const uint256& hash)
|
|||||||
|
|
||||||
#ifndef NO_SQLITE3_PREPARE
|
#ifndef NO_SQLITE3_PREPARE
|
||||||
{
|
{
|
||||||
|
std::string sql = "SELECT ObjType,LedgerIndex,Object FROM CommittedObjects WHERE Hash = '";
|
||||||
|
sql.append(hash.GetHex());
|
||||||
|
sql.append("';");
|
||||||
|
|
||||||
ScopedLock sl(theApp->getHashNodeDB()->getDBLock());
|
ScopedLock sl(theApp->getHashNodeDB()->getDBLock());
|
||||||
LoadEvent::autoptr event(theApp->getJobQueue().getLoadEventAP(jtDISK, "HOS::retrieve"));
|
LoadEvent::autoptr event(theApp->getJobQueue().getLoadEventAP(jtDISK, "HOS::retrieve"));
|
||||||
SqliteStatement pSt(theApp->getHashNodeDB()->getDB()->getSqliteDB(),
|
SqliteStatement pSt(theApp->getHashNodeDB()->getDB()->getSqliteDB(), sql.c_str());
|
||||||
"SELECT ObjType,LedgerIndex,Object FROM CommittedObjects WHERE Hash = ?;");
|
|
||||||
|
|
||||||
pSt.bind(1, hash.GetHex());
|
|
||||||
|
|
||||||
int ret = pSt.step();
|
int ret = pSt.step();
|
||||||
if (pSt.isDone(ret))
|
if (pSt.isDone(ret))
|
||||||
|
|||||||
Reference in New Issue
Block a user