Changeset View
Changeset View
Standalone View
Standalone View
src/dbwrapper.cpp
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | if (fMemory) { | ||||
} | } | ||||
TryCreateDirectories(path); | TryCreateDirectories(path); | ||||
LogPrintf("Opening LevelDB in %s\n", path.string()); | LogPrintf("Opening LevelDB in %s\n", path.string()); | ||||
} | } | ||||
leveldb::Status status = leveldb::DB::Open(options, path.string(), &pdb); | leveldb::Status status = leveldb::DB::Open(options, path.string(), &pdb); | ||||
dbwrapper_private::HandleError(status); | dbwrapper_private::HandleError(status); | ||||
LogPrintf("Opened LevelDB successfully\n"); | LogPrintf("Opened LevelDB successfully\n"); | ||||
if (GetBoolArg("-forcecompactdb", false)) { | if (gArgs.GetBoolArg("-forcecompactdb", false)) { | ||||
LogPrintf("Starting database compaction of %s\n", path.string()); | LogPrintf("Starting database compaction of %s\n", path.string()); | ||||
pdb->CompactRange(nullptr, nullptr); | pdb->CompactRange(nullptr, nullptr); | ||||
LogPrintf("Finished database compaction of %s\n", path.string()); | LogPrintf("Finished database compaction of %s\n", path.string()); | ||||
} | } | ||||
// The base-case obfuscation key, which is a noop. | // The base-case obfuscation key, which is a noop. | ||||
obfuscate_key = std::vector<uint8_t>(OBFUSCATE_KEY_NUM_BYTES, '\000'); | obfuscate_key = std::vector<uint8_t>(OBFUSCATE_KEY_NUM_BYTES, '\000'); | ||||
▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines |