Allow LevelDB and SQLite to co-exist in the build and have the backing

store for hashed nodes selectable in the config.
This commit is contained in:
JoelKatz
2013-05-07 15:04:23 -07:00
parent a417640c9d
commit e086fa5a5d
10 changed files with 131 additions and 59 deletions

View File

@@ -2159,11 +2159,12 @@ Json::Value RPCHandler::doGetCounts(Json::Value jvRequest, int& cost, ScopedLock
if (dbKB > 0)
ret["dbKBLedger"] = dbKB;
#ifndef USE_LEVELDB
dbKB = theApp->getHashNodeDB()->getDB()->getKBUsedDB();
if (dbKB > 0)
ret["dbKBHashNode"] = dbKB;
#endif
if (!theApp->getHashedObjectStore().isLevelDB())
{
dbKB = theApp->getHashNodeDB()->getDB()->getKBUsedDB();
if (dbKB > 0)
ret["dbKBHashNode"] = dbKB;
}
dbKB = theApp->getTxnDB()->getDB()->getKBUsedDB();
if (dbKB > 0)