MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / GetOptions

Function GetOptions

src/persistence/leveldbwrapper.cpp:44–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44static leveldb::Options GetOptions(size_t nCacheSize) {
45 leveldb::Options options;
46 options.block_cache = leveldb::NewLRUCache(nCacheSize / 2);
47 options.write_buffer_size = nCacheSize / 4; // up to two write buffers may be held in memory simultaneously
48 options.filter_policy = leveldb::NewBloomFilterPolicy(10);
49 options.compression = leveldb::kNoCompression;
50 options.max_open_files = 64;
51 return options;
52}
53
54CLevelDBWrapper::CLevelDBWrapper(const boost::filesystem::path &path, size_t nCacheSize, bool fMemory, bool fWipe) {
55 penv = nullptr;

Callers 1

CLevelDBWrapperMethod · 0.85

Calls 2

NewLRUCacheFunction · 0.85
NewBloomFilterPolicyFunction · 0.85

Tested by

no test coverage detected