diff options
| author | Nsable-sh <nsable-sh@noreply.git.bitflash.network> | 2026-08-13 18:11:30 -0300 |
|---|---|---|
| committer | Nsable-sh <nsable-sh@noreply.git.bitflash.network> | 2026-08-13 18:11:30 -0300 |
| commit | 540ed06974ff6b05364d4922895288744f076f6b (patch) | |
| tree | 6d7ba6802278f148fd98ffc3a482a47991dc08a7 /src/main_gui.cpp | |
| parent | 805c5757b801d80ea575c6a8b58e2855254f9046 (diff) | |
wallet: add storage sanity check
Diffstat (limited to 'src/main_gui.cpp')
| -rw-r--r-- | src/main_gui.cpp | 9 |
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(); |