Changeset View
Changeset View
Standalone View
Standalone View
src/dbwrapper.cpp
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | if (leveldb::kMajorVersion > 1 || | ||||
options.paranoid_checks = true; | options.paranoid_checks = true; | ||||
} | } | ||||
SetMaxOpenFiles(&options); | SetMaxOpenFiles(&options); | ||||
return options; | return options; | ||||
} | } | ||||
CDBWrapper::CDBWrapper(const fs::path &path, size_t nCacheSize, bool fMemory, | CDBWrapper::CDBWrapper(const fs::path &path, size_t nCacheSize, bool fMemory, | ||||
bool fWipe, bool obfuscate) | bool fWipe, bool obfuscate) | ||||
: m_name(fs::basename(path)) { | : m_name{path.stem().string()} { | ||||
penv = nullptr; | penv = nullptr; | ||||
readoptions.verify_checksums = true; | readoptions.verify_checksums = true; | ||||
iteroptions.verify_checksums = true; | iteroptions.verify_checksums = true; | ||||
iteroptions.fill_cache = false; | iteroptions.fill_cache = false; | ||||
syncoptions.sync = true; | syncoptions.sync = true; | ||||
options = GetOptions(nCacheSize); | options = GetOptions(nCacheSize); | ||||
options.create_if_missing = true; | options.create_if_missing = true; | ||||
if (fMemory) { | if (fMemory) { | ||||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |