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:
authorNsable-sh <nsable-sh@noreply.git.bitflash.network>2026-08-14 17:44:09 -0300
committerNsable-sh <nsable-sh@noreply.git.bitflash.network>2026-08-14 17:44:09 -0300
commit3e778dd6cc9045862e99503b5b9af80ec682826f (patch)
tree4a055fb61ea1c6fde9edc65c8ec7356baa8c9c07 /src/main_gui.cpp
parent307d1a79d4f9bdecd3f834f9ab4987f46d16d177 (diff)
wallet: check SQLite exports against loader types
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 cf96822..c9aac7d 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -187,6 +187,8 @@ static void PrintUsage()
187 printf(" printing counts only, then exit)\n"); 187 printf(" printing counts only, then exit)\n");
188 printf(" /walletsqliterestore=FILE (rebuild wallet.dat from a SQLite export in\n"); 188 printf(" /walletsqliterestore=FILE (rebuild wallet.dat from a SQLite export in\n");
189 printf(" an empty data directory, then exit)\n"); 189 printf(" an empty data directory, then exit)\n");
190 printf(" /walletsqliteloadcheck=FILE\n");
191 printf(" (parse a SQLite export like the wallet loader)\n");
190 printf(" /rescan (walk the chain for coins this wallet owns\n"); 192 printf(" /rescan (walk the chain for coins this wallet owns\n");
191 printf(" but never recorded, then exit)\n"); 193 printf(" but never recorded, then exit)\n");
192 printf("\n"); 194 printf("\n");
@@ -562,6 +564,15 @@ int main(int argc, char* argv[])
562 return nRet; 564 return nRet;
563 } 565 }
564 566
567 string strWalletSQLiteLoadCheck =
568 argval2(argc, argv, "/walletsqliteloadcheck", "-walletsqliteloadcheck");
569 if (!strWalletSQLiteLoadCheck.empty())
570 {
571 int nRet = CmdWalletSQLiteLoadCheck(strWalletSQLiteLoadCheck);
572 DBFlush(true);
573 return nRet;
574 }
575
565 // Berkeley DB reports failure by throwing, and CDB's constructor lets it 576 // Berkeley DB reports failure by throwing, and CDB's constructor lets it
566 // through. Nothing on this path caught anything, so an unreadable 577 // through. Nothing on this path caught anything, so an unreadable
567 // blkindex.dat or wallet.dat -- one written by another platform's Berkeley 578 // blkindex.dat or wallet.dat -- one written by another platform's Berkeley