diff options
Diffstat (limited to 'src/main_gui.cpp')
| -rw-r--r-- | src/main_gui.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp index caacf13..cf96822 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp | |||
| @@ -185,6 +185,8 @@ static void PrintUsage() | |||
| 185 | printf(" experimental SQLite store, then exit)\n"); | 185 | printf(" experimental SQLite store, then exit)\n"); |
| 186 | printf(" /walletsqliteverify=FILE (compare wallet.dat with a SQLite export,\n"); | 186 | printf(" /walletsqliteverify=FILE (compare wallet.dat with a SQLite export,\n"); |
| 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"); | ||
| 189 | printf(" an empty data directory, then exit)\n"); | ||
| 188 | printf(" /rescan (walk the chain for coins this wallet owns\n"); | 190 | printf(" /rescan (walk the chain for coins this wallet owns\n"); |
| 189 | printf(" but never recorded, then exit)\n"); | 191 | printf(" but never recorded, then exit)\n"); |
| 190 | printf("\n"); | 192 | printf("\n"); |
| @@ -551,6 +553,15 @@ int main(int argc, char* argv[]) | |||
| 551 | return nRet; | 553 | return nRet; |
| 552 | } | 554 | } |
| 553 | 555 | ||
| 556 | string strWalletSQLiteRestore = | ||
| 557 | argval2(argc, argv, "/walletsqliterestore", "-walletsqliterestore"); | ||
| 558 | if (!strWalletSQLiteRestore.empty()) | ||
| 559 | { | ||
| 560 | int nRet = CmdWalletSQLiteRestore(strWalletSQLiteRestore); | ||
| 561 | DBFlush(true); | ||
| 562 | return nRet; | ||
| 563 | } | ||
| 564 | |||
| 554 | // Berkeley DB reports failure by throwing, and CDB's constructor lets it | 565 | // Berkeley DB reports failure by throwing, and CDB's constructor lets it |
| 555 | // through. Nothing on this path caught anything, so an unreadable | 566 | // through. Nothing on this path caught anything, so an unreadable |
| 556 | // blkindex.dat or wallet.dat -- one written by another platform's Berkeley | 567 | // blkindex.dat or wallet.dat -- one written by another platform's Berkeley |