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:06:39 -0300
committerBitflash <admin@bitflash.network>2026-08-14 16:06:39 -0300
commit25b1eb8e17bb4012a59166667c7e37564a2af939 (patch)
tree0cf369cd3e1c59eca068cc05561dd59c21bf7b49 /src/main_gui.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/main_gui.cpp')
-rw-r--r--src/main_gui.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 965c818..6e89270 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -114,8 +114,8 @@ static void PrintUsage()
114 printf(" /gen\n"); 114 printf(" /gen\n");
115 printf(" /nogui or /daemon\n"); 115 printf(" /nogui or /daemon\n");
116 printf(" /selftest=wallet-keypool, wallet-hd, wallet-format, wallet-storage-sanity,\n"); 116 printf(" /selftest=wallet-keypool, wallet-hd, wallet-format, wallet-storage-sanity,\n");
117 printf(" db-env-reopen, wallet-sqlite, wallet-crypto, wallet-encrypt,\n"); 117 printf(" db-env-reopen, wallet-sqlite, wallet-sqlite-migration,\n");
118 printf(" wallet-portability,\n"); 118 printf(" wallet-crypto, wallet-encrypt, wallet-portability,\n");
119 printf(" net-message,\n"); 119 printf(" net-message,\n");
120 printf(" consensus-limits, pool-stratum,\n"); 120 printf(" consensus-limits, pool-stratum,\n");
121 printf(" parse-money, socks5-proxy, or managed-tor\n"); 121 printf(" parse-money, socks5-proxy, or managed-tor\n");
@@ -181,6 +181,8 @@ static void PrintUsage()
181 printf(" (write the same audit as deterministic JSON)\n"); 181 printf(" (write the same audit as deterministic JSON)\n");
182 printf(" /walletstoragecheck (fail closed on inconsistent or unsafe\n"); 182 printf(" /walletstoragecheck (fail closed on inconsistent or unsafe\n");
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");
185 printf(" experimental SQLite store, then exit)\n");
184 printf(" /rescan (walk the chain for coins this wallet owns\n"); 186 printf(" /rescan (walk the chain for coins this wallet owns\n");
185 printf(" but never recorded, then exit)\n"); 187 printf(" but never recorded, then exit)\n");
186 printf("\n"); 188 printf("\n");
@@ -529,6 +531,15 @@ int main(int argc, char* argv[])
529 return nRet; 531 return nRet;
530 } 532 }
531 533
534 string strWalletSQLiteExport =
535 argval2(argc, argv, "/walletsqliteexport", "-walletsqliteexport");
536 if (!strWalletSQLiteExport.empty())
537 {
538 int nRet = CmdWalletSQLiteExport(strWalletSQLiteExport);
539 DBFlush(true);
540 return nRet;
541 }
542
532 // Berkeley DB reports failure by throwing, and CDB's constructor lets it 543 // Berkeley DB reports failure by throwing, and CDB's constructor lets it
533 // through. Nothing on this path caught anything, so an unreadable 544 // through. Nothing on this path caught anything, so an unreadable
534 // blkindex.dat or wallet.dat -- one written by another platform's Berkeley 545 // blkindex.dat or wallet.dat -- one written by another platform's Berkeley