Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/init.cpp
Show All 39 Lines | 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 " | ||||
"selecting on a per-output basis. Privacy is improved as an " | "selecting on a per-output basis. Privacy is improved as an " | ||||
"address is only used once (unless someone sends to it after " | "address is only used once (unless someone sends to it after " | ||||
"spending from it), but may result in slightly higher fees " | "spending from it), but may result in slightly higher fees " | ||||
"as suboptimal coin selection may result due to the added " | "as suboptimal coin selection may result due to the added " | ||||
"limitation (default: %u)", | "limitation (default: %u)", | ||||
DEFAULT_AVOIDPARTIALSPENDS), | DEFAULT_AVOIDPARTIALSPENDS), | ||||
false, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET); | ||||
gArgs.AddArg("-disablewallet", | gArgs.AddArg("-disablewallet", | ||||
"Do not load the wallet and disable wallet RPC calls", false, | "Do not load the wallet and disable wallet RPC calls", | ||||
OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET); | ||||
gArgs.AddArg("-fallbackfee=<amt>", | gArgs.AddArg("-fallbackfee=<amt>", | ||||
strprintf("A fee rate (in %s/kB) that will be used when fee " | strprintf("A fee rate (in %s/kB) that will be used when fee " | ||||
"estimation has insufficient data (default: %s)", | "estimation has insufficient data (default: %s)", | ||||
CURRENCY_UNIT, FormatMoney(DEFAULT_FALLBACK_FEE)), | CURRENCY_UNIT, FormatMoney(DEFAULT_FALLBACK_FEE)), | ||||
false, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET); | ||||
gArgs.AddArg("-keypool=<n>", | gArgs.AddArg("-keypool=<n>", | ||||
strprintf("Set key pool size to <n> (default: %u)", | strprintf("Set key pool size to <n> (default: %u)", | ||||
DEFAULT_KEYPOOL_SIZE), | DEFAULT_KEYPOOL_SIZE), | ||||
false, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-maxtxfee=<amt>", | "-maxtxfee=<amt>", | ||||
strprintf("Maximum total fees (in %s) to use in a single wallet " | strprintf("Maximum total fees (in %s) to use in a single wallet " | ||||
"transaction or raw transaction; setting this too low may " | "transaction or raw transaction; setting this too low may " | ||||
"abort large transactions (default: %s)", | "abort large transactions (default: %s)", | ||||
CURRENCY_UNIT, FormatMoney(DEFAULT_TRANSACTION_MAXFEE)), | CURRENCY_UNIT, FormatMoney(DEFAULT_TRANSACTION_MAXFEE)), | ||||
false, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-mintxfee=<amt>", | gArgs.AddArg("-mintxfee=<amt>", | ||||
strprintf("Fees (in %s/kB) smaller than this are considered " | strprintf("Fees (in %s/kB) smaller than this are considered " | ||||
"zero fee for transaction creation (default: %s)", | "zero fee for transaction creation (default: %s)", | ||||
CURRENCY_UNIT, | CURRENCY_UNIT, | ||||
FormatMoney(DEFAULT_TRANSACTION_MINFEE_PER_KB)), | FormatMoney(DEFAULT_TRANSACTION_MINFEE_PER_KB)), | ||||
false, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-paytxfee=<amt>", | "-paytxfee=<amt>", | ||||
strprintf( | strprintf( | ||||
"Fee (in %s/kB) to add to transactions you send (default: %s)", | "Fee (in %s/kB) to add to transactions you send (default: %s)", | ||||
CURRENCY_UNIT, | CURRENCY_UNIT, | ||||
FormatMoney(CFeeRate{DEFAULT_PAY_TX_FEE}.GetFeePerK())), | FormatMoney(CFeeRate{DEFAULT_PAY_TX_FEE}.GetFeePerK())), | ||||
false, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-rescan", | "-rescan", | ||||
"Rescan the block chain for missing wallet transactions on startup", | "Rescan the block chain for missing wallet transactions on startup", | ||||
false, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-salvagewallet", | "-salvagewallet", | ||||
"Attempt to recover private keys from a corrupt wallet on startup", | "Attempt to recover private keys from a corrupt wallet on startup", | ||||
false, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-spendzeroconfchange", | "-spendzeroconfchange", | ||||
strprintf( | strprintf( | ||||
"Spend unconfirmed change when sending transactions (default: %d)", | "Spend unconfirmed change when sending transactions (default: %d)", | ||||
DEFAULT_SPEND_ZEROCONF_CHANGE), | DEFAULT_SPEND_ZEROCONF_CHANGE), | ||||
false, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET); | ||||
gArgs.AddArg("-upgradewallet", "Upgrade wallet to latest format on startup", | gArgs.AddArg("-upgradewallet", "Upgrade wallet to latest format on startup", | ||||
false, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET); | ||||
gArgs.AddArg("-wallet=<path>", | gArgs.AddArg("-wallet=<path>", | ||||
"Specify wallet database path. Can be specified multiple " | "Specify wallet database path. Can be specified multiple " | ||||
"times to load multiple wallets. Path is interpreted relative " | "times to load multiple wallets. Path is interpreted relative " | ||||
"to <walletdir> if it is not absolute, and will be created if " | "to <walletdir> if it is not absolute, and will be created if " | ||||
"it does not exist (as a directory containing a wallet.dat " | "it does not exist (as a directory containing a wallet.dat " | ||||
"file and log files). For backwards compatibility this will " | "file and log files). For backwards compatibility this will " | ||||
"also accept names of existing data files in <walletdir>.)", | "also accept names of existing data files in <walletdir>.)", | ||||
false, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-walletbroadcast", | "-walletbroadcast", | ||||
strprintf("Make the wallet broadcast transactions (default: %d)", | strprintf("Make the wallet broadcast transactions (default: %d)", | ||||
DEFAULT_WALLETBROADCAST), | DEFAULT_WALLETBROADCAST), | ||||
false, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET); | ||||
gArgs.AddArg("-walletdir=<dir>", | gArgs.AddArg("-walletdir=<dir>", | ||||
"Specify directory to hold wallets (default: " | "Specify directory to hold wallets (default: " | ||||
"<datadir>/wallets if it exists, otherwise <datadir>)", | "<datadir>/wallets if it exists, otherwise <datadir>)", | ||||
false, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET); | ||||
gArgs.AddArg("-walletnotify=<cmd>", | gArgs.AddArg("-walletnotify=<cmd>", | ||||
"Execute command when a wallet transaction changes (%s in cmd " | "Execute command when a wallet transaction changes (%s in cmd " | ||||
"is replaced by TxID)", | "is replaced by TxID)", | ||||
false, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-zapwallettxes=<mode>", | "-zapwallettxes=<mode>", | ||||
"Delete all wallet transactions and only recover those parts of the " | "Delete all wallet transactions and only recover those parts of the " | ||||
"blockchain through -rescan on startup (1 = keep tx meta data e.g. " | "blockchain through -rescan on startup (1 = keep tx meta data e.g. " | ||||
"payment request information, 2 = drop tx meta data)", | "payment request information, 2 = drop tx meta data)", | ||||
false, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET); | ||||
gArgs.AddArg("-dblogsize=<n>", | gArgs.AddArg("-dblogsize=<n>", | ||||
strprintf("Flush wallet database activity from memory to disk " | strprintf("Flush wallet database activity from memory to disk " | ||||
"log every <n> megabytes (default: %u)", | "log every <n> megabytes (default: %u)", | ||||
DEFAULT_WALLET_DBLOGSIZE), | DEFAULT_WALLET_DBLOGSIZE), | ||||
true, OptionsCategory::WALLET_DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, | ||||
OptionsCategory::WALLET_DEBUG_TEST); | |||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-flushwallet", | "-flushwallet", | ||||
strprintf("Run a thread to flush wallet periodically (default: %d)", | strprintf("Run a thread to flush wallet periodically (default: %d)", | ||||
DEFAULT_FLUSHWALLET), | DEFAULT_FLUSHWALLET), | ||||
true, OptionsCategory::WALLET_DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::WALLET_DEBUG_TEST); | ||||
gArgs.AddArg("-privdb", | gArgs.AddArg("-privdb", | ||||
strprintf("Sets the DB_PRIVATE flag in the wallet db " | strprintf("Sets the DB_PRIVATE flag in the wallet db " | ||||
"environment (default: %d)", | "environment (default: %d)", | ||||
DEFAULT_WALLET_PRIVDB), | DEFAULT_WALLET_PRIVDB), | ||||
true, OptionsCategory::WALLET_DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, | ||||
OptionsCategory::WALLET_DEBUG_TEST); | |||||
gArgs.AddArg("-walletrejectlongchains", | gArgs.AddArg("-walletrejectlongchains", | ||||
strprintf("Wallet will not create transactions that violate " | strprintf("Wallet will not create transactions that violate " | ||||
"mempool chain limits (default: %d)", | "mempool chain limits (default: %d)", | ||||
DEFAULT_WALLET_REJECT_LONG_CHAINS), | DEFAULT_WALLET_REJECT_LONG_CHAINS), | ||||
true, OptionsCategory::WALLET_DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, | ||||
OptionsCategory::WALLET_DEBUG_TEST); | |||||
} | } | ||||
bool WalletInit::ParameterInteraction() const { | bool WalletInit::ParameterInteraction() const { | ||||
const bool is_multiwallet = gArgs.GetArgs("-wallet").size() > 1; | const bool is_multiwallet = gArgs.GetArgs("-wallet").size() > 1; | ||||
if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) { | if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) { | ||||
return true; | return true; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 220 Lines • Show Last 20 Lines |