diff options
Diffstat (limited to 'src/wallet_sqlite.cpp')
| -rw-r--r-- | src/wallet_sqlite.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wallet_sqlite.cpp b/src/wallet_sqlite.cpp index 4104ac6..4369af6 100644 --- a/src/wallet_sqlite.cpp +++ b/src/wallet_sqlite.cpp | |||
| @@ -97,6 +97,16 @@ bool CWalletDBSQLite::RollbackTransaction(string& strError) | |||
| 97 | return Exec("ROLLBACK;", strError); | 97 | return Exec("ROLLBACK;", strError); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | bool CWalletDBSQLite::Checkpoint(string& strError) | ||
| 101 | { | ||
| 102 | if (!pdb) | ||
| 103 | { | ||
| 104 | strError = "SQLite wallet is not open"; | ||
| 105 | return false; | ||
| 106 | } | ||
| 107 | return Exec("PRAGMA wal_checkpoint(TRUNCATE);", strError); | ||
| 108 | } | ||
| 109 | |||
| 100 | bool CWalletDBSQLite::Exec(const char* pszSql, string& strError) | 110 | bool CWalletDBSQLite::Exec(const char* pszSql, string& strError) |
| 101 | { | 111 | { |
| 102 | char* pszErr = NULL; | 112 | char* pszErr = NULL; |