diff options
Diffstat (limited to 'src/dbwrapper.cpp')
-rw-r--r-- | src/dbwrapper.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dbwrapper.cpp b/src/dbwrapper.cpp index ba9e21cc1f..3626e0177f 100644 --- a/src/dbwrapper.cpp +++ b/src/dbwrapper.cpp @@ -115,6 +115,12 @@ CDBWrapper::CDBWrapper(const fs::path& path, size_t nCacheSize, bool fMemory, bo dbwrapper_private::HandleError(status); LogPrintf("Opened LevelDB successfully\n"); + if (GetBoolArg("-forcecompactdb", false)) { + LogPrintf("Starting database compaction of %s\n", path.string()); + pdb->CompactRange(nullptr, nullptr); + LogPrintf("Finished database compaction of %s\n", path.string()); + } + // The base-case obfuscation key, which is a noop. obfuscate_key = std::vector<unsigned char>(OBFUSCATE_KEY_NUM_BYTES, '\000'); |