Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/init.cpp
Show All 25 Lines | public: | ||||
bool HasWalletSupport() const override { return true; } | bool HasWalletSupport() const override { return true; } | ||||
//! Return the wallets help message. | //! Return the wallets help message. | ||||
void AddWalletOptions() const override; | void AddWalletOptions() const override; | ||||
//! Wallets parameter interaction | //! Wallets parameter interaction | ||||
bool ParameterInteraction() const override; | bool ParameterInteraction() const override; | ||||
//! Add wallets that should be opened to list of init interfaces. | //! Add wallets that should be opened to list of chain clients. | ||||
void Construct(InitInterfaces &interfaces) const override; | void Construct(NodeContext &node) const override; | ||||
}; | }; | ||||
const WalletInitInterface &g_wallet_init_interface = WalletInit(); | const WalletInitInterface &g_wallet_init_interface = WalletInit(); | ||||
void WalletInit::AddWalletOptions() const { | void WalletInit::AddWalletOptions() const { | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-avoidpartialspends", | "-avoidpartialspends", | ||||
strprintf("Group outputs by address, selecting all or none, instead of " | strprintf("Group outputs by address, selecting all or none, instead of " | ||||
▲ Show 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | if (gArgs.IsArgSet("-maxtxfee")) { | ||||
.translated, | .translated, | ||||
gArgs.GetArg("-maxtxfee", ""), minRelayTxFee.ToString())); | gArgs.GetArg("-maxtxfee", ""), minRelayTxFee.ToString())); | ||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
void WalletInit::Construct(InitInterfaces &interfaces) const { | void WalletInit::Construct(NodeContext &node) const { | ||||
if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) { | if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) { | ||||
LogPrintf("Wallet disabled!\n"); | LogPrintf("Wallet disabled!\n"); | ||||
return; | return; | ||||
} | } | ||||
gArgs.SoftSetArg("-wallet", ""); | gArgs.SoftSetArg("-wallet", ""); | ||||
interfaces.chain_clients.emplace_back(interfaces::MakeWalletClient( | node.chain_clients.emplace_back( | ||||
*interfaces.chain, gArgs.GetArgs("-wallet"))); | interfaces::MakeWalletClient(*node.chain, gArgs.GetArgs("-wallet"))); | ||||
} | } |