diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-06-22 17:58:18 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-09-08 21:02:53 -0400 |
commit | 1bee1e6269b76b52b1eab9112d39c245beaa27a2 (patch) | |
tree | 1b437fa47cf89317a767c7e5ae25087283d5d28a /src/wallet/init.cpp | |
parent | 78cb45d72251e85db07e8500bbdd2e9460b132b2 (diff) | |
download | bitcoin-1bee1e6269b76b52b1eab9112d39c245beaa27a2.tar.xz |
Do not create default wallet
No longer create a default wallet. The default wallet will still be
loaded if it exists and not other wallets were specified (anywhere,
including settings.json, bitcoin.conf, and command line).
Tests are updated to be started with -wallet= if they need the default
wallet.
Added test to wallet_startup.py testing that no default wallet is
created and that it is loaded if it exists and no other wallets were
specified.
Diffstat (limited to 'src/wallet/init.cpp')
-rw-r--r-- | src/wallet/init.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp index 3910599ca7..5d8c4fba29 100644 --- a/src/wallet/init.cpp +++ b/src/wallet/init.cpp @@ -107,16 +107,7 @@ void WalletInit::Construct(NodeContext& node) const LogPrintf("Wallet disabled!\n"); return; } - // If there's no -wallet setting with a list of wallets to load, set it to - // load the default "" wallet. - if (!args.IsArgSet("wallet")) { - args.LockSettings([&](util::Settings& settings) { - util::SettingsValue wallets(util::SettingsValue::VARR); - wallets.push_back(""); // Default wallet name is "" - settings.rw_settings["wallet"] = wallets; - }); - } - auto wallet_client = interfaces::MakeWalletClient(*node.chain, args, args.GetArgs("-wallet")); + auto wallet_client = interfaces::MakeWalletClient(*node.chain, args); node.wallet_client = wallet_client.get(); node.chain_clients.emplace_back(std::move(wallet_client)); } |