mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-24 21:15:58 +00:00
Use a bloom filter on suitably sized nodes.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#ifdef USE_LEVELDB
|
||||
#include "leveldb/cache.h"
|
||||
#include "leveldb/filter_policy.h"
|
||||
#endif
|
||||
|
||||
#include "AcceptedLedger.h"
|
||||
@@ -169,6 +170,8 @@ void Application::setup()
|
||||
leveldb::Options options;
|
||||
options.create_if_missing = true;
|
||||
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);
|
||||
if (!status.ok() || !mHashNodeDB)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user