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 08:56:57 -0300
committerBitflash <admin@bitflash.network>2026-08-14 08:56:57 -0300
commitcf597ca37aec53b0dd7016399fee73e1959dc604 (patch)
tree8487caa5b4471b1203b46e0f73fce0362bf2c950 /src/main_gui.cpp
parent5306542f6121e0c0b4ed1210e24d55fa4fbb7127 (diff)
parent33af98c042340f6431aa93b4b6f893d85f40f237 (diff)
Merge pull request 'wallet: fail closed on unsafe wallet storage state' (#39) from wallet-storage-sanity-checks into main
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r--src/main_gui.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 395cc0f..8763211 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -176,6 +176,8 @@ static void PrintUsage()
176 printf(" printing wallet values, then exit)\n"); 176 printf(" printing wallet values, then exit)\n");
177 printf(" /walletstorageauditjson=FILE\n"); 177 printf(" /walletstorageauditjson=FILE\n");
178 printf(" (write the same audit as deterministic JSON)\n"); 178 printf(" (write the same audit as deterministic JSON)\n");
179 printf(" /walletstoragecheck (fail closed on inconsistent or unsafe\n");
180 printf(" wallet.dat storage state)\n");
179 printf(" /rescan (walk the chain for coins this wallet owns\n"); 181 printf(" /rescan (walk the chain for coins this wallet owns\n");
180 printf(" but never recorded, then exit)\n"); 182 printf(" but never recorded, then exit)\n");
181 printf("\n"); 183 printf("\n");
@@ -719,6 +721,13 @@ int main(int argc, char* argv[])
719 return nRet; 721 return nRet;
720 } 722 }
721 723
724 if (arg(argc,argv,"/walletstoragecheck") || arg(argc,argv,"-walletstoragecheck"))
725 {
726 int nRet = CmdWalletStorageCheck();
727 DBFlush(true);
728 return nRet;
729 }
730
722 if (arg(argc,argv,"/newphrase") || arg(argc,argv,"-newphrase")) 731 if (arg(argc,argv,"/newphrase") || arg(argc,argv,"-newphrase"))
723 { 732 {
724 int nRet = CmdNewPhrase(); 733 int nRet = CmdNewPhrase();