| 42 | } |
| 43 | |
| 44 | static 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 | |
| 54 | CLevelDBWrapper::CLevelDBWrapper(const boost::filesystem::path &path, size_t nCacheSize, bool fMemory, bool fWipe) { |
| 55 | penv = nullptr; |
no test coverage detected