upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/wallet_sqlite.cpp
diff options
context:
space:
mode:
authorBitflash <admin@bitflash.network>2026-08-14 16:06:39 -0300
committerBitflash <admin@bitflash.network>2026-08-14 16:06:39 -0300
commit25b1eb8e17bb4012a59166667c7e37564a2af939 (patch)
tree0cf369cd3e1c59eca068cc05561dd59c21bf7b49 /src/wallet_sqlite.cpp
parentc08a32d26cabf5acc9dabf298a22051596308174 (diff)
parent59b9d11015f0e3a2475d0750fc534583c2ca9f77 (diff)
Merge pull request 'wallet: export BDB records to SQLite' (#48) from wallet-sqlite-migration into main
Diffstat (limited to 'src/wallet_sqlite.cpp')
-rw-r--r--src/wallet_sqlite.cpp10
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
100bool 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
100bool CWalletDBSQLite::Exec(const char* pszSql, string& strError) 110bool CWalletDBSQLite::Exec(const char* pszSql, string& strError)
101{ 111{
102 char* pszErr = NULL; 112 char* pszErr = NULL;