aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/sqlite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/sqlite.cpp')
-rw-r--r--src/wallet/sqlite.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/sqlite.cpp b/src/wallet/sqlite.cpp
index 1889313dd5..f9c4dfb2a5 100644
--- a/src/wallet/sqlite.cpp
+++ b/src/wallet/sqlite.cpp
@@ -181,7 +181,9 @@ void SQLiteDatabase::Open()
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