45 "-avoidpartialspends",
46 strprintf(
"Group outputs by address, selecting all or none, instead of "
47 "selecting on a per-output basis. Privacy is improved as an "
48 "address is only used once (unless someone sends to it after "
49 "spending from it), but may result in slightly higher fees "
50 "as suboptimal coin selection may result due to the added "
51 "limitation (default: %u (always enabled for wallets with "
52 "\"avoid_reuse\" enabled))",
56 argsman.AddArg(
"-disablewallet",
57 "Do not load the wallet and disable wallet RPC calls",
60 argsman.AddArg(
"-fallbackfee=<amt>",
61 strprintf(
"A fee rate (in %s/kB) that will be used when fee "
62 "estimation has insufficient data. 0 to entirely "
63 "disable the fallbackfee feature. (default: %s)",
68 strprintf(
"Set key pool size to <n> (default: %u). Warning: Smaller "
69 "sizes may increase the risk of losing funds when restoring "
70 "from an old backup, if none of the addresses in the "
71 "original keypool have been used.",
77 "Spend up to this amount in additional (absolute) fees (in %s) if "
78 "it allows the use of partial spend avoidance (default: %s)",
83 strprintf(
"Maximum total fees (in %s) to use in a single wallet "
84 "transaction or raw transaction; setting this too low may "
85 "abort large transactions (default: %s)",
88 argsman.AddArg(
"-mintxfee=<amt>",
89 strprintf(
"Fees (in %s/kB) smaller than this are considered "
90 "zero fee for transaction creation (default: %s)",
97 "Fee (in %s/kB) to add to transactions you send (default: %s)",
102 "Rescan the block chain for missing wallet transactions on startup",
105 "-spendzeroconfchange",
107 "Spend unconfirmed change when sending transactions (default: %d)",
112 "Specify wallet path to load at startup. Can be used multiple times to "
113 "load multiple wallets. Path is to a directory containing wallet data "
114 "and log files. If the path is not absolute, it is interpreted "
115 "relative to <walletdir>. This only loads existing wallets and does "
116 "not create new ones. For backwards compatibility this also accepts "
117 "names of existing top-level data files in <walletdir>.",
122 strprintf(
"Make the wallet broadcast transactions (default: %d)",
125 argsman.AddArg(
"-walletdir=<dir>",
126 "Specify directory to hold wallets (default: "
127 "<datadir>/wallets if it exists, otherwise <datadir>)",
130#if defined(HAVE_SYSTEM)
132 "-walletnotify=<cmd>",
133 "Execute command when a wallet transaction changes. %s in cmd "
134 "is replaced by TxID and %w is replaced by wallet name. %w is "
135 "not currently implemented on windows. On systems where %w is "
136 "supported, it should NOT be quoted because this would break "
137 "shell escaping used to invoke the command.",
142 strprintf(
"Flush wallet database activity from memory to disk "
143 "log every <n> megabytes (default: %u)",
149 strprintf(
"Run a thread to flush wallet periodically (default: %d)",
154 strprintf(
"Sets the DB_PRIVATE flag in the wallet db "
155 "environment (default: %d)",
160 argsman.AddHiddenArgs({
"-zapwallettxes"});
166 LogPrintf(
"%s: parameter interaction: -disablewallet -> ignoring "
176 LogPrintf(
"%s: parameter interaction: -blocksonly=1 -> setting "
177 "-walletbroadcast=0\n",
183 Untranslated(
"-zapwallettxes has been removed. If you are "
184 "attempting to remove a stuck transaction from your "
185 "wallet, please use abandontransaction instead."));
190 Untranslated(
"-sysperms is not allowed in combination with enabled "
191 "wallet functionality"));
204 node.wallet_client = wallet_client.get();
205 node.chain_clients.emplace_back(std::move(wallet_client));
static const unsigned int DEFAULT_WALLET_DBLOGSIZE
static const bool DEFAULT_WALLET_PRIVDB
#define Assert(val)
Identity function.
std::vector< std::string > GetArgs(const std::string &strArg) const
Return a vector of strings of the given argument.
bool IsArgSet(const std::string &strArg) const
Return true if the given argument has been manually set.
bool SoftSetBoolArg(const std::string &strArg, bool fValue)
Set a boolean argument if it doesn't already have a value.
bool GetBoolArg(const std::string &strArg, bool fDefault) const
Return boolean argument or default value.
Fee rate in satoshis per kilobyte: Amount / kB.
void Construct(NodeContext &node) const override
Add wallets that should be opened to list of chain clients.
bool ParameterInteraction() const override
Wallets parameter interaction.
void AddWalletOptions(ArgsManager &argsman) const override
Return the wallets help message.
bool HasWalletSupport() const override
Was the wallet component compiled in.
static constexpr bool DEFAULT_AVOIDPARTIALSPENDS
Default for -avoidpartialspends.
std::string FormatMoney(const Amount amt)
Do not use these functions to represent or parse monetary amounts to or from JSON but use AmountFromV...
std::unique_ptr< WalletClient > MakeWalletClient(Chain &chain, ArgsManager &args)
Return implementation of ChainClient interface for a wallet client.
static const bool DEFAULT_BLOCKSONLY
Default for blocks only.
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
static const unsigned int DEFAULT_KEYPOOL_SIZE
Default for -keypool.
static const Currency & get()
NodeContext struct containing references to chain state and connection state.
bilingual_str Untranslated(std::string original)
Mark a bilingual_str as untranslated.
bool InitError(const bilingual_str &str)
Show error message.
const WalletInitInterface & g_wallet_init_interface
constexpr Amount DEFAULT_PAY_TX_FEE
-paytxfee default
static const bool DEFAULT_DISABLE_WALLET
static const Amount DEFAULT_FALLBACK_FEE
-fallbackfee default
static const Amount DEFAULT_TRANSACTION_MINFEE_PER_KB
-mintxfee default
static const bool DEFAULT_SPEND_ZEROCONF_CHANGE
Default for -spendzeroconfchange.
constexpr Amount DEFAULT_TRANSACTION_MAXFEE
-maxtxfee default
static const Amount DEFAULT_MAX_AVOIDPARTIALSPEND_FEE
maximum fee increase allowed to do partial spend avoidance, even for nodes with this feature disabled...
static const bool DEFAULT_WALLETBROADCAST
static const bool DEFAULT_FLUSHWALLET
Overview of wallet database classes: