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-17 10:37:07 -0300
committerBitflash <admin@bitflash.network>2026-08-17 10:37:07 -0300
commitf7033201689c6eb70f16b242b9f90be548f67aa5 (patch)
treee6ecab8a276afb007f341a498dd1a8553a756b0c /src/main_gui.cpp
parentc56af18e421dff78446399a630b5fa949fc487b3 (diff)
parentf9ee957bd6d3f28dfee166a82f389aad666a0119 (diff)
Merge pull request 'wallet: stage SQLite runtime loading' (#55) from wallet-sqlite-runtime into main
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r--src/main_gui.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index c9aac7d..ee875c7 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -189,6 +189,7 @@ static void PrintUsage()
189 printf(" an empty data directory, then exit)\n"); 189 printf(" an empty data directory, then exit)\n");
190 printf(" /walletsqliteloadcheck=FILE\n"); 190 printf(" /walletsqliteloadcheck=FILE\n");
191 printf(" (parse a SQLite export like the wallet loader)\n"); 191 printf(" (parse a SQLite export like the wallet loader)\n");
192 printf(" /walletsqlite=FILE (stage-load a SQLite wallet export, then exit)\n");
192 printf(" /rescan (walk the chain for coins this wallet owns\n"); 193 printf(" /rescan (walk the chain for coins this wallet owns\n");
193 printf(" but never recorded, then exit)\n"); 194 printf(" but never recorded, then exit)\n");
194 printf("\n"); 195 printf("\n");
@@ -617,6 +618,27 @@ int main(int argc, char* argv[])
617 printf("Loading wallet...\n"); 618 printf("Loading wallet...\n");
618 try 619 try
619 { 620 {
621 string strWalletSQLite =
622 argval2(argc, argv, "/walletsqlite", "-walletsqlite");
623 if (!strWalletSQLite.empty())
624 {
625 AttachTerminal();
626 if (!LoadWalletFromSQLite(strWalletSQLite))
627 {
628 FatalStartupError(fHeadlessStartup,
629 "Cannot open SQLite wallet export.",
630 strWalletLoadError);
631 return 1;
632 }
633
634 fprintf(stderr, "SQLite wallet loaded: read-only staging backend\n");
635 fprintf(stderr, "SQLite runtime writes are not enabled yet; exiting before "
636 "network, mining, GUI, or wallet mutation starts.\n");
637 fflush(stderr);
638 DBFlush(true);
639 return 0;
640 }
641
620 if (!LoadWallet()) 642 if (!LoadWallet())
621 { 643 {
622 // LoadWallet() explains itself into strWalletLoadError when it 644 // LoadWallet() explains itself into strWalletLoadError when it