mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Add undocumented -forcecompactdb to force LevelDB compactions
This commit is contained in:
parent
e222618a32
commit
8842d1a5d4
2 changed files with 7 additions and 1 deletions
|
|
@ -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');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue