diff options
| author | MarcoFalke <[email protected]> | 2020-05-11 17:40:21 +0200 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2020-07-09 13:07:37 +0200 |
| commit | faf8401c195f52470d1ca6e2c94cb3820e57ee41 (patch) | |
| tree | 910f9d852aa3d2b8ea6dc5434f791b93096ed036 /src/wallet/init.cpp | |
| parent | gui tests: Limit life-time of dummy testing setup (diff) | |
| download | discoin-faf8401c195f52470d1ca6e2c94cb3820e57ee41.tar.xz discoin-faf8401c195f52470d1ca6e2c94cb3820e57ee41.zip | |
wallet: Pass unused args to StartWallets
This refactor does not change behavior
Diffstat (limited to 'src/wallet/init.cpp')
| -rw-r--r-- | src/wallet/init.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp index f173b5e62..781920755 100644 --- a/src/wallet/init.cpp +++ b/src/wallet/init.cpp @@ -9,6 +9,7 @@ #include <node/context.h> #include <node/ui_interface.h> #include <outputtype.h> +#include <util/check.h> #include <util/moneystr.h> #include <util/system.h> #include <util/translation.h> @@ -16,9 +17,9 @@ #include <wallet/wallet.h> #include <walletinitinterface.h> -class WalletInit : public WalletInitInterface { +class WalletInit : public WalletInitInterface +{ public: - //! Was the wallet component compiled in. bool HasWalletSupport() const override {return true;} @@ -112,10 +113,11 @@ bool WalletInit::ParameterInteraction() const void WalletInit::Construct(NodeContext& node) const { - if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) { + ArgsManager& args = *Assert(node.args); + if (args.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) { LogPrintf("Wallet disabled!\n"); return; } - gArgs.SoftSetArg("-wallet", ""); - node.chain_clients.emplace_back(interfaces::MakeWalletClient(*node.chain, gArgs.GetArgs("-wallet"))); + args.SoftSetArg("-wallet", ""); + node.chain_clients.emplace_back(interfaces::MakeWalletClient(*node.chain, args, args.GetArgs("-wallet"))); } |