diff --git a/src/wallet/sqlite.cpp b/src/wallet/sqlite.cpp --- a/src/wallet/sqlite.cpp +++ b/src/wallet/sqlite.cpp @@ -238,7 +238,10 @@ } bool SQLiteDatabase::Rewrite(const char *skip) { - return false; + // Rewrite the database using the VACUUM command: + // https://sqlite.org/lang_vacuum.html + int ret = sqlite3_exec(m_db, "VACUUM", nullptr, nullptr, nullptr); + return ret == SQLITE_OK; } bool SQLiteDatabase::Backup(const std::string &dest) const {