diff options
Diffstat (limited to 'src/main_gui.cpp')
| -rw-r--r-- | src/main_gui.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 4d77533..4be4995 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp | |||
| @@ -625,6 +625,21 @@ int main(int argc, char* argv[]) | |||
| 625 | string strWalletSQLite = | 625 | string strWalletSQLite = |
| 626 | argval2(argc, argv, "/walletsqlite", "-walletsqlite"); | 626 | argval2(argc, argv, "/walletsqlite", "-walletsqlite"); |
| 627 | 627 | ||
| 628 | // A misspelled backend must not fall through to Berkeley DB silently -- | ||
| 629 | // someone who typed -walletbackend=sqlit meant to run on SQLite, and | ||
| 630 | // opening wallet.dat instead of telling them is the wrong surprise. | ||
| 631 | if (!strWalletBackend.empty() && | ||
| 632 | strWalletBackend != "sqlite" && strWalletBackend != "bdb") | ||
| 633 | { | ||
| 634 | AttachTerminal(); | ||
| 635 | FatalStartupError(fHeadlessStartup, | ||
| 636 | strprintf("Unknown wallet backend '%s'.", strWalletBackend.c_str()), | ||
| 637 | "Use -walletbackend=sqlite for the experimental SQLite backend, " | ||
| 638 | "or omit -walletbackend (or -walletbackend=bdb) to use the " | ||
| 639 | "default Berkeley DB wallet.dat."); | ||
| 640 | return 1; | ||
| 641 | } | ||
| 642 | |||
| 628 | if (strWalletBackend == "sqlite") | 643 | if (strWalletBackend == "sqlite") |
| 629 | { | 644 | { |
| 630 | // Opt-in, experimental. The node runs on <datadir>/wallet.sqlite and | 645 | // Opt-in, experimental. The node runs on <datadir>/wallet.sqlite and |