42 "-avoidpartialspends",
43 strprintf(
"Group outputs by address, selecting all or none, instead of " 44 "selecting on a per-output basis. Privacy is improved as an " 45 "address is only used once (unless someone sends to it after " 46 "spending from it), but may result in slightly higher fees " 47 "as suboptimal coin selection may result due to the added " 48 "limitation (default: %u (always enabled for wallets with " 49 "\"avoid_reuse\" enabled))",
53 argsman.
AddArg(
"-disablewallet",
54 "Do not load the wallet and disable wallet RPC calls",
56 argsman.
AddArg(
"-fallbackfee=<amt>",
57 strprintf(
"A fee rate (in %s/kB) that will be used when fee " 58 "estimation has insufficient data. 0 to entirely " 59 "disable the fallbackfee feature. (default: %s)",
64 strprintf(
"Set key pool size to <n> (default: %u). Warning: Smaller " 65 "sizes may increase the risk of losing funds when restoring " 66 "from an old backup, if none of the addresses in the " 67 "original keypool have been used.",
73 "Spend up to this amount in additional (absolute) fees (in %s) if " 74 "it allows the use of partial spend avoidance (default: %s)",
79 strprintf(
"Maximum total fees (in %s) to use in a single wallet " 80 "transaction or raw transaction; setting this too low may " 81 "abort large transactions (default: %s)",
84 argsman.
AddArg(
"-mintxfee=<amt>",
85 strprintf(
"Fees (in %s/kB) smaller than this are considered " 86 "zero fee for transaction creation (default: %s)",
93 "Fee (in %s/kB) to add to transactions you send (default: %s)",
99 "Rescan the block chain for missing wallet transactions on startup",
102 "-spendzeroconfchange",
104 "Spend unconfirmed change when sending transactions (default: %d)",
109 "Specify wallet database path. Can be specified multiple " 110 "times to load multiple wallets. Path is interpreted relative " 111 "to <walletdir> if it is not absolute, and will be created if " 112 "it does not exist (as a directory containing a wallet.dat " 113 "file and log files). For backwards compatibility this will " 114 "also accept names of existing data files in <walletdir>.)",
119 strprintf(
"Make the wallet broadcast transactions (default: %d)",
122 argsman.
AddArg(
"-walletdir=<dir>",
123 "Specify directory to hold wallets (default: " 124 "<datadir>/wallets if it exists, otherwise <datadir>)",
127 #if defined(HAVE_SYSTEM) 129 "-walletnotify=<cmd>",
130 "Execute command when a wallet transaction changes. %s in cmd " 131 "is replaced by TxID and %w is replaced by wallet name. %w is " 132 "not currently implemented on windows. On systems where %w is " 133 "supported, it should NOT be quoted because this would break " 134 "shell escaping used to invoke the command.",
138 "-zapwallettxes=<mode>",
139 "Delete all wallet transactions and only recover those parts of the " 140 "blockchain through -rescan on startup (1 = keep tx meta data e.g. " 141 "payment request information, 2 = drop tx meta data)",
146 strprintf(
"Flush wallet database activity from memory to disk " 147 "log every <n> megabytes (default: %u)",
153 strprintf(
"Run a thread to flush wallet periodically (default: %d)",
158 strprintf(
"Sets the DB_PRIVATE flag in the wallet db " 159 "environment (default: %d)",
163 argsman.
AddArg(
"-walletrejectlongchains",
164 strprintf(
"Wallet will not create transactions that violate " 165 "mempool chain limits (default: %d)",
173 for (
const std::string &wallet :
gArgs.
GetArgs(
"-wallet")) {
174 LogPrintf(
"%s: parameter interaction: -disablewallet -> ignoring " 182 const bool is_multiwallet =
gArgs.
GetArgs(
"-wallet").size() > 1;
186 LogPrintf(
"%s: parameter interaction: -blocksonly=1 -> setting " 187 "-walletbroadcast=0\n",
194 LogPrintf(
"%s: parameter interaction: -zapwallettxes enabled -> " 195 "setting -persistmempool=0\n",
201 if (is_multiwallet) {
203 Untranslated(
"%s is only allowed with a single wallet file"),
207 LogPrintf(
"%s: parameter interaction: -zapwallettxes enabled -> " 208 "setting -rescan=1\n",
215 Untranslated(
"-sysperms is not allowed in combination with enabled " 216 "wallet functionality"));
std::vector< std::unique_ptr< interfaces::ChainClient > > chain_clients
const std::string CURRENCY_UNIT
bool SoftSetBoolArg(const std::string &strArg, bool fValue)
Set a boolean argument if it doesn't already have a value.
bilingual_str Untranslated(std::string original)
Mark a bilingual_str as untranslated.
std::unique_ptr< interfaces::Chain > chain
static void LogPrintf(const char *fmt, const Args &... args)
void Construct(NodeContext &node) const override
Add wallets that should be opened to list of chain clients.
static const bool DEFAULT_DISABLE_WALLET
static const unsigned int DEFAULT_WALLET_DBLOGSIZE
bool GetBoolArg(const std::string &strArg, bool fDefault) const
Return boolean argument or default value.
static const bool DEFAULT_WALLET_PRIVDB
bool HasWalletSupport() const override
Was the wallet component compiled in.
bool SoftSetArg(const std::string &strArg, const std::string &strValue)
Set an argument if it doesn't already have a value.
NodeContext struct containing references to chain state and connection state.
static const Amount DEFAULT_FALLBACK_FEE
-fallbackfee default
constexpr Amount DEFAULT_PAY_TX_FEE
-paytxfee default
static const unsigned int DEFAULT_KEYPOOL_SIZE
Default for -keypool.
void AddArg(const std::string &name, const std::string &help, unsigned int flags, const OptionsCategory &cat)
Add argument.
static const bool DEFAULT_WALLETBROADCAST
static const bool DEFAULT_SPEND_ZEROCONF_CHANGE
Default for -spendzeroconfchange.
bool InitError(const bilingual_str &str)
Show error message.
static constexpr bool DEFAULT_AVOIDPARTIALSPENDS
Default for -avoidpartialspends.
void AddWalletOptions(ArgsManager &argsman) const override
Return the wallets help message.
static const bool DEFAULT_WALLET_REJECT_LONG_CHAINS
Default for -walletrejectlongchains.
const WalletInitInterface & g_wallet_init_interface
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_FLUSHWALLET
Overview of wallet database classes:
Fee rate in satoshis per kilobyte: Amount / kB.
static const bool DEFAULT_BLOCKSONLY
Default for blocks only.
std::vector< std::string > GetArgs(const std::string &strArg) const
Return a vector of strings of the given argument.
bool ParameterInteraction() const override
Wallets parameter interaction.
constexpr Amount DEFAULT_TRANSACTION_MAXFEE
-maxtxfee default
std::unique_ptr< ChainClient > MakeWalletClient(Chain &chain, ArgsManager &args, std::vector< std::string > wallet_filenames)
Return implementation of ChainClient interface for a wallet client.
static const Amount DEFAULT_TRANSACTION_MINFEE_PER_KB
-mintxfee default
#define Assert(val)
Identity function.
std::string FormatMoney(const Amount amt)
Money parsing/formatting utilities.