mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 05:25:55 +00:00
Use a bloom filter on suitably sized nodes.
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#ifdef USE_LEVELDB
|
#ifdef USE_LEVELDB
|
||||||
#include "leveldb/cache.h"
|
#include "leveldb/cache.h"
|
||||||
|
#include "leveldb/filter_policy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "AcceptedLedger.h"
|
#include "AcceptedLedger.h"
|
||||||
@@ -169,6 +170,8 @@ void Application::setup()
|
|||||||
leveldb::Options options;
|
leveldb::Options options;
|
||||||
options.create_if_missing = true;
|
options.create_if_missing = true;
|
||||||
options.block_cache = leveldb::NewLRUCache(theConfig.getSize(siHashNodeDBCache) * 1024 * 1024);
|
options.block_cache = leveldb::NewLRUCache(theConfig.getSize(siHashNodeDBCache) * 1024 * 1024);
|
||||||
|
if (NODE_SIZE >= 2)
|
||||||
|
options.filter_policy = NewBloomFilterPolicy(10);
|
||||||
leveldb::Status status = leveldb::DB::Open(options, (theConfig.DATA_DIR / "hashnode").string(), &mHashNodeDB);
|
leveldb::Status status = leveldb::DB::Open(options, (theConfig.DATA_DIR / "hashnode").string(), &mHashNodeDB);
|
||||||
if (!status.ok() || !mHashNodeDB)
|
if (!status.ok() || !mHashNodeDB)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user