upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/main_gui.cpp
diff options
context:
space:
mode:
authorBitflash <admin@bitflash.network>2026-08-14 16:53:01 -0300
committerBitflash <admin@bitflash.network>2026-08-14 16:53:01 -0300
commit35f6c752f9f879ca94478985978e4a9c862ede3e (patch)
treea32b59dde39832f1fc7a21a29681b77c95de40cb /src/main_gui.cpp
parent0c58896a045246c3518d5d379f217172defdfd91 (diff)
parent99c6b5f2971da51cca1c739b5e982ae2022acc85 (diff)
Merge pull request 'wallet: verify SQLite wallet exports' (#50) from wallet-sqlite-verify into main
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r--src/main_gui.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 6e89270..caacf13 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -183,6 +183,8 @@ static void PrintUsage()
183 printf(" wallet.dat storage state)\n"); 183 printf(" wallet.dat storage state)\n");
184 printf(" /walletsqliteexport=FILE (copy raw wallet.dat records into an\n"); 184 printf(" /walletsqliteexport=FILE (copy raw wallet.dat records into an\n");
185 printf(" experimental SQLite store, then exit)\n"); 185 printf(" experimental SQLite store, then exit)\n");
186 printf(" /walletsqliteverify=FILE (compare wallet.dat with a SQLite export,\n");
187 printf(" printing counts only, then exit)\n");
186 printf(" /rescan (walk the chain for coins this wallet owns\n"); 188 printf(" /rescan (walk the chain for coins this wallet owns\n");
187 printf(" but never recorded, then exit)\n"); 189 printf(" but never recorded, then exit)\n");
188 printf("\n"); 190 printf("\n");
@@ -540,6 +542,15 @@ int main(int argc, char* argv[])
540 return nRet; 542 return nRet;
541 } 543 }
542 544
545 string strWalletSQLiteVerify =
546 argval2(argc, argv, "/walletsqliteverify", "-walletsqliteverify");
547 if (!strWalletSQLiteVerify.empty())
548 {
549 int nRet = CmdWalletSQLiteVerify(strWalletSQLiteVerify);
550 DBFlush(true);
551 return nRet;
552 }
553
543 // Berkeley DB reports failure by throwing, and CDB's constructor lets it 554 // Berkeley DB reports failure by throwing, and CDB's constructor lets it
544 // through. Nothing on this path caught anything, so an unreadable 555 // through. Nothing on this path caught anything, so an unreadable
545 // blkindex.dat or wallet.dat -- one written by another platform's Berkeley 556 // blkindex.dat or wallet.dat -- one written by another platform's Berkeley