mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-04 04:45:10 +02:00
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.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user