mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-24 21:15:58 +00:00
LevelDB fixes.
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
|
||||
#include "Application.h"
|
||||
|
||||
#ifdef USE_LEVELDB
|
||||
#include "leveldb/cache.h"
|
||||
#endif
|
||||
|
||||
#include "AcceptedLedger.h"
|
||||
#include "Config.h"
|
||||
#include "PeerDoor.h"
|
||||
@@ -162,6 +167,7 @@ void Application::setup()
|
||||
#ifdef USE_LEVELDB
|
||||
leveldb::Options options;
|
||||
options.create_if_missing = true;
|
||||
options.block_cache = leveldb::NewLRUCache(theConfig.getSize(siHashNodeDBCache) * 1024 * 1024);
|
||||
leveldb::Status status = leveldb::DB::Open(options, (theConfig.DATA_DIR / "hashnode").string(), &mHashNodeDB);
|
||||
if (!status.ok() || !mHashNodeDB)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user