Page MenuHomePhabricator

D5768.id18951.diff
No OneTemporary

D5768.id18951.diff

diff --git a/src/bench/bench_bitcoin.cpp b/src/bench/bench_bitcoin.cpp
--- a/src/bench/bench_bitcoin.cpp
+++ b/src/bench/bench_bitcoin.cpp
@@ -22,50 +22,48 @@
static void SetupBenchArgs() {
gArgs.AddArg("-?", "Print this help message and exit",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-list",
"List benchmarks without executing them. Can be combined "
"with -scaling and -filter",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg(
"-evals=<n>",
strprintf("Number of measurement evaluations to perform. (default: %u)",
DEFAULT_BENCH_EVALUATIONS),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-filter=<regex>",
strprintf("Regular expression filter to select benchmark by "
"name (default: %s)",
DEFAULT_BENCH_FILTER),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg(
"-scaling=<n>",
strprintf("Scaling factor for benchmark's runtime (default: %u)",
DEFAULT_BENCH_SCALING),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg(
"-printer=(console|plot)",
strprintf("Choose printer format. console: print data to console. "
"plot: Print results as HTML graph (default: %s)",
DEFAULT_BENCH_PRINTER),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-plot-plotlyurl=<uri>",
strprintf("URL to use for plotly.js (default: %s)",
DEFAULT_PLOT_PLOTLYURL),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg(
"-plot-width=<x>",
strprintf("Plot width in pixel (default: %u)", DEFAULT_PLOT_WIDTH),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg(
"-plot-height=<x>",
strprintf("Plot height in pixel (default: %u)", DEFAULT_PLOT_HEIGHT),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
// Hidden
- gArgs.AddArg("-h", "", ArgsManager::ALLOW_ANY, false,
- OptionsCategory::HIDDEN);
- gArgs.AddArg("-help", "", ArgsManager::ALLOW_ANY, false,
- OptionsCategory::HIDDEN);
+ gArgs.AddArg("-h", "", ArgsManager::ALLOW_ANY, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-help", "", ArgsManager::ALLOW_ANY, OptionsCategory::HIDDEN);
}
int main(int argc, char **argv) {
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -40,17 +40,17 @@
const auto regtestBaseParams =
CreateBaseChainParams(CBaseChainParams::REGTEST);
- gArgs.AddArg("-?", "This help message", ArgsManager::ALLOW_ANY, false,
+ gArgs.AddArg("-?", "This help message", ArgsManager::ALLOW_ANY,
OptionsCategory::OPTIONS);
gArgs.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY,
- false, OptionsCategory::OPTIONS);
+ OptionsCategory::OPTIONS);
gArgs.AddArg("-conf=<file>",
strprintf("Specify configuration file. Relative paths will be "
"prefixed by datadir location. (default: %s)",
BITCOIN_CONF_FILENAME),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-datadir=<dir>", _("Specify data directory"),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg(
"-getinfo",
"Get general information from the remote server. Note that unlike "
@@ -58,62 +58,60 @@
"multiple non-atomic requests. Some entries in the result may "
"represent results from different states (e.g. wallet balance may be "
"as of a different block from the chain state reported)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
SetupChainParamsBaseOptions();
gArgs.AddArg(
"-named",
strprintf("Pass named instead of positional arguments (default: %s)",
DEFAULT_NAMED),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg(
"-rpcconnect=<ip>",
strprintf("Send commands to node running on <ip> (default: %s)",
DEFAULT_RPCCONNECT),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpccookiefile=<loc>",
"Location of the auth cookie. Relative paths will be prefixed "
"by a net-specific datadir location. (default: data dir)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcport=<port>",
strprintf("Connect to JSON-RPC on <port> (default: %u, "
"testnet: %u, regtest: %u)",
defaultBaseParams->RPCPort(),
testnetBaseParams->RPCPort(),
regtestBaseParams->RPCPort()),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcwait", "Wait for RPC server to start",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcuser=<user>", "Username for JSON-RPC connections",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcpassword=<pw>", "Password for JSON-RPC connections",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcclienttimeout=<n>",
strprintf("Timeout in seconds during HTTP requests, or 0 for "
"no timeout. (default: %d)",
DEFAULT_HTTP_CLIENT_TIMEOUT),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-stdinrpcpass",
strprintf("Read RPC password from standard input as a single "
"line. When combined with -stdin, the first line "
"from standard input is used for the RPC password."),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-stdin",
"Read extra arguments from standard input, one per line until "
"EOF/Ctrl-D (recommended for sensitive information such as "
"passphrases)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg(
"-rpcwallet=<walletname>",
"Send RPC for non-default wallet on RPC server (needs to exactly match "
"corresponding -wallet option passed to bitcoind)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
// Hidden
- gArgs.AddArg("-h", "", ArgsManager::ALLOW_ANY, false,
- OptionsCategory::HIDDEN);
- gArgs.AddArg("-help", "", ArgsManager::ALLOW_ANY, false,
- OptionsCategory::HIDDEN);
+ gArgs.AddArg("-h", "", ArgsManager::ALLOW_ANY, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-help", "", ArgsManager::ALLOW_ANY, OptionsCategory::HIDDEN);
}
/** libevent event log callback */
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -35,48 +35,48 @@
const std::function<std::string(const char *)> G_TRANSLATION_FUN = nullptr;
static void SetupBitcoinTxArgs() {
- gArgs.AddArg("-?", "This help message", ArgsManager::ALLOW_ANY, false,
+ gArgs.AddArg("-?", "This help message", ArgsManager::ALLOW_ANY,
OptionsCategory::OPTIONS);
gArgs.AddArg("-create", "Create new, empty TX.", ArgsManager::ALLOW_ANY,
- false, OptionsCategory::OPTIONS);
- gArgs.AddArg("-json", "Select JSON output", ArgsManager::ALLOW_ANY, false,
+ OptionsCategory::OPTIONS);
+ gArgs.AddArg("-json", "Select JSON output", ArgsManager::ALLOW_ANY,
OptionsCategory::OPTIONS);
gArgs.AddArg("-txid",
"Output only the hex-encoded transaction id of the resultant "
"transaction.",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
SetupChainParamsBaseOptions();
gArgs.AddArg("delin=N", "Delete input N from TX", ArgsManager::ALLOW_ANY,
- false, OptionsCategory::COMMANDS);
+ OptionsCategory::COMMANDS);
gArgs.AddArg("delout=N", "Delete output N from TX", ArgsManager::ALLOW_ANY,
- false, OptionsCategory::COMMANDS);
+ OptionsCategory::COMMANDS);
gArgs.AddArg("in=TXID:VOUT(:SEQUENCE_NUMBER)", "Add input to TX",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::COMMANDS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::COMMANDS);
gArgs.AddArg("locktime=N", "Set TX lock time to N", ArgsManager::ALLOW_ANY,
- false, OptionsCategory::COMMANDS);
+ OptionsCategory::COMMANDS);
gArgs.AddArg("nversion=N", "Set TX version to N", ArgsManager::ALLOW_ANY,
- false, OptionsCategory::COMMANDS);
+ OptionsCategory::COMMANDS);
gArgs.AddArg("outaddr=VALUE:ADDRESS", "Add address-based output to TX",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::COMMANDS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::COMMANDS);
gArgs.AddArg("outpubkey=VALUE:PUBKEY[:FLAGS]",
"Add pay-to-pubkey output to TX. "
"Optionally add the \"S\" flag to wrap the output in a "
"pay-to-script-hash.",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::COMMANDS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::COMMANDS);
gArgs.AddArg("outdata=[VALUE:]DATA", "Add data-based output to TX",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::COMMANDS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::COMMANDS);
gArgs.AddArg("outscript=VALUE:SCRIPT[:FLAGS]",
"Add raw script output to TX. "
"Optionally add the \"S\" flag to wrap the output in a "
"pay-to-script-hash.",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::COMMANDS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::COMMANDS);
gArgs.AddArg(
"outmultisig=VALUE:REQUIRED:PUBKEYS:PUBKEY1:PUBKEY2:....[:FLAGS]",
"Add Pay To n-of-m Multi-sig output to TX. n = REQUIRED, m = PUBKEYS. "
"Optionally add the \"S\" flag to wrap the output in a "
"pay-to-script-hash.",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::COMMANDS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::COMMANDS);
gArgs.AddArg("sign=SIGHASH-FLAGS",
"Add zero or more signatures to transaction. "
"This command requires JSON registers:"
@@ -84,20 +84,18 @@
"privatekeys=JSON object. "
"See signrawtransactionwithkey docs for format of sighash "
"flags, JSON objects.",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::COMMANDS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::COMMANDS);
- gArgs.AddArg(
- "load=NAME:FILENAME", "Load JSON file FILENAME into register NAME",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::REGISTER_COMMANDS);
- gArgs.AddArg(
- "set=NAME:JSON-STRING", "Set register NAME to given JSON-STRING",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::REGISTER_COMMANDS);
+ gArgs.AddArg("load=NAME:FILENAME",
+ "Load JSON file FILENAME into register NAME",
+ ArgsManager::ALLOW_ANY, OptionsCategory::REGISTER_COMMANDS);
+ gArgs.AddArg("set=NAME:JSON-STRING",
+ "Set register NAME to given JSON-STRING",
+ ArgsManager::ALLOW_ANY, OptionsCategory::REGISTER_COMMANDS);
// Hidden
- gArgs.AddArg("-h", "", ArgsManager::ALLOW_ANY, false,
- OptionsCategory::HIDDEN);
- gArgs.AddArg("-help", "", ArgsManager::ALLOW_ANY, false,
- OptionsCategory::HIDDEN);
+ gArgs.AddArg("-h", "", ArgsManager::ALLOW_ANY, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-help", "", ArgsManager::ALLOW_ANY, OptionsCategory::HIDDEN);
}
//
diff --git a/src/bitcoin-wallet.cpp b/src/bitcoin-wallet.cpp
--- a/src/bitcoin-wallet.cpp
+++ b/src/bitcoin-wallet.cpp
@@ -21,30 +21,28 @@
static void SetupWalletToolArgs() {
SetupChainParamsBaseOptions();
- gArgs.AddArg("-?", "This help message", ArgsManager::ALLOW_ANY, false,
+ gArgs.AddArg("-?", "This help message", ArgsManager::ALLOW_ANY,
OptionsCategory::OPTIONS);
gArgs.AddArg("-datadir=<dir>", "Specify data directory",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-wallet=<wallet-name>", "Specify wallet name",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-debug=<category>",
"Output debugging information (default: 0).",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-printtoconsole",
"Send trace/debug info to console (default: 1 when no -debug "
"is true, 0 otherwise.",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
- gArgs.AddArg("info", "Get wallet info", ArgsManager::ALLOW_ANY, false,
+ gArgs.AddArg("info", "Get wallet info", ArgsManager::ALLOW_ANY,
OptionsCategory::COMMANDS);
gArgs.AddArg("create", "Create new wallet file", ArgsManager::ALLOW_ANY,
- false, OptionsCategory::COMMANDS);
+ OptionsCategory::COMMANDS);
// Hidden
- gArgs.AddArg("-h", "", ArgsManager::ALLOW_ANY, false,
- OptionsCategory::HIDDEN);
- gArgs.AddArg("-help", "", ArgsManager::ALLOW_ANY, false,
- OptionsCategory::HIDDEN);
+ gArgs.AddArg("-h", "", ArgsManager::ALLOW_ANY, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-help", "", ArgsManager::ALLOW_ANY, OptionsCategory::HIDDEN);
}
static bool WalletAppInit(int argc, char *argv[]) {
diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp
--- a/src/chainparamsbase.cpp
+++ b/src/chainparamsbase.cpp
@@ -20,9 +20,10 @@
"Enter regression test mode, which uses a special chain in "
"which blocks can be solved instantly. This is intended for "
"regression testing tools and app development.",
- ArgsManager::ALLOW_ANY, true, OptionsCategory::CHAINPARAMS);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::CHAINPARAMS);
gArgs.AddArg("-testnet", "Use the test chain", ArgsManager::ALLOW_ANY,
- false, OptionsCategory::CHAINPARAMS);
+ OptionsCategory::CHAINPARAMS);
}
static std::unique_ptr<CBaseChainParams> globalChainBaseParams;
diff --git a/src/init.cpp b/src/init.cpp
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -395,13 +395,13 @@
// technical terms, and only a very small audience, so is unnecessary stress
// to translators.
gArgs.AddArg("-?", "Print this help message and exit",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY,
- false, OptionsCategory::OPTIONS);
+ OptionsCategory::OPTIONS);
gArgs.AddArg("-alertnotify=<cmd>",
"Execute command when a relevant alert is received or we see "
"a really long fork (%s in cmd is replaced by message)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg(
"-assumevalid=<hex>",
strprintf(
@@ -410,88 +410,91 @@
"verify all, default: %s, testnet: %s)",
defaultChainParams->GetConsensus().defaultAssumeValid.GetHex(),
testnetChainParams->GetConsensus().defaultAssumeValid.GetHex()),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-blocksdir=<dir>",
"Specify directory to hold blocks subdirectory for *.dat "
"files (default: <datadir>)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-blocknotify=<cmd>",
"Execute command when the best block changes (%s in cmd is "
"replaced by block hash)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-blockreconstructionextratxn=<n>",
strprintf("Extra transactions to keep in memory for compact "
"block reconstructions (default: %u)",
DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg(
"-blocksonly",
strprintf("Whether to operate in a blocks only mode (default: %d)",
DEFAULT_BLOCKSONLY),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::OPTIONS);
gArgs.AddArg("-conf=<file>",
strprintf("Specify configuration file. Relative paths will be "
"prefixed by datadir location. (default: %s)",
BITCOIN_CONF_FILENAME),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-datadir=<dir>", "Specify data directory",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg(
"-dbbatchsize",
strprintf("Maximum database write batch size in bytes (default: %u)",
nDefaultDbBatchSize),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::OPTIONS);
gArgs.AddArg(
"-dbcache=<n>",
strprintf(
"Set database cache size in megabytes (%d to %d, default: %d)",
nMinDbCache, nMaxDbCache, nDefaultDbCache),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-debuglogfile=<file>",
strprintf("Specify location of debug log file. Relative paths "
"will be prefixed by a net-specific datadir "
"location. (0 to disable; default: %s)",
DEFAULT_DEBUGLOGFILE),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-feefilter",
strprintf("Tell other nodes to filter invs to us by our "
"mempool min fee (default: %d)",
DEFAULT_FEEFILTER),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::OPTIONS);
gArgs.AddArg("-finalizationdelay=<n>",
strprintf("Set the minimum amount of time to wait between a "
"block header reception and the block finalization. "
"Unit is seconds (default: %d)",
DEFAULT_MIN_FINALIZATION_DELAY),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg(
"-includeconf=<file>",
"Specify additional configuration file, relative to the -datadir path "
"(only useable from configuration file, not command line)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-maxreorgdepth=<n>",
strprintf("Configure at what depth blocks are considered "
"final (default: %d). Use -1 to disable.",
DEFAULT_MAX_REORG_DEPTH),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-loadblock=<file>",
"Imports blocks from external blk000??.dat file on startup",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-maxmempool=<n>",
strprintf("Keep the transaction memory pool below <n> "
"megabytes (default: %u)",
DEFAULT_MAX_MEMPOOL_SIZE),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-maxorphantx=<n>",
strprintf("Keep at most <n> unconnectable transactions in "
"memory (default: %u)",
DEFAULT_MAX_ORPHAN_TRANSACTIONS),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-mempoolexpiry=<n>",
strprintf("Do not keep transactions in the mempool longer "
"than <n> hours (default: %u)",
DEFAULT_MEMPOOL_EXPIRY),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg(
"-minimumchainwork=<hex>",
strprintf(
@@ -499,24 +502,25 @@
"(default: %s, testnet: %s)",
defaultChainParams->GetConsensus().nMinimumChainWork.GetHex(),
testnetChainParams->GetConsensus().nMinimumChainWork.GetHex()),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::OPTIONS);
gArgs.AddArg(
"-par=<n>",
strprintf("Set the number of script verification threads (%u to %d, 0 "
"= auto, <0 = leave that many cores free, default: %d)",
-GetNumCores(), MAX_SCRIPTCHECK_THREADS,
DEFAULT_SCRIPTCHECK_THREADS),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-persistmempool",
strprintf("Whether to save the mempool on shutdown and load "
"on restart (default: %u)",
DEFAULT_PERSIST_MEMPOOL),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-pid=<file>",
strprintf("Specify pid file. Relative paths will be prefixed "
"by a net-specific datadir location. (default: %s)",
BITCOIN_PID_FILENAME),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg(
"-prune=<n>",
strprintf("Reduce storage requirements by enabling pruning (deleting) "
@@ -529,22 +533,22 @@
"= allow manual pruning via RPC, >=%u = automatically prune "
"block files to stay under the specified target size in MiB)",
MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-reindex-chainstate",
"Rebuild chain state from the currently indexed blocks. When "
"in pruning mode or if blocks on disk might be corrupted, use "
"full -reindex instead.",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg(
"-reindex",
"Rebuild chain state and block index from the blk*.dat files on disk",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
#ifndef WIN32
gArgs.AddArg(
"-sysperms",
"Create new files with system default permissions, instead of umask "
"077 (only effective with disabled wallet functionality)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
#else
hidden_args.emplace_back("-sysperms");
#endif
@@ -552,152 +556,152 @@
strprintf("Maintain a full transaction index, used by the "
"getrawtransaction rpc call (default: %d)",
DEFAULT_TXINDEX),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-usecashaddr",
"Use Cash Address for destination encoding instead of base58 "
"(activate by default on Jan, 14)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-addnode=<ip>",
"Add a node to connect to and attempt to keep the connection "
"open (see the `addnode` RPC command help for more info)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg(
"-banscore=<n>",
strprintf("Threshold for disconnecting misbehaving peers (default: %u)",
DEFAULT_BANSCORE_THRESHOLD),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-bantime=<n>",
strprintf("Number of seconds to keep misbehaving peers from "
"reconnecting (default: %u)",
DEFAULT_MISBEHAVING_BANTIME),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-bind=<addr>",
"Bind to given address and always listen on it. Use "
"[host]:port notation for IPv6",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg(
"-connect=<ip>",
"Connect only to the specified node(s); -connect=0 disables automatic "
"connections (the rules for this peer are the same as for -addnode)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-discover",
"Discover own IP addresses (default: 1 when listening and no "
"-externalip or -proxy)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-dns",
strprintf("Allow DNS lookups for -addnode, -seednode and "
"-connect (default: %d)",
DEFAULT_NAME_LOOKUP),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-dnsseed",
"Query for peer addresses via DNS lookup, if low on addresses "
"(default: 1 unless -connect used)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-enablebip61",
strprintf("Send reject messages per BIP61 (default: %u)",
DEFAULT_ENABLE_BIP61),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-externalip=<ip>", "Specify your own public address",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg(
"-forcednsseed",
strprintf(
"Always query for peer addresses via DNS lookup (default: %d)",
DEFAULT_FORCEDNSSEED),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg(
"-listen",
"Accept connections from outside (default: 1 if no -proxy or -connect)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg(
"-listenonion",
strprintf("Automatically create Tor hidden service (default: %d)",
DEFAULT_LISTEN_ONION),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg(
"-maxconnections=<n>",
strprintf("Maintain at most <n> connections to peers (default: %u)",
DEFAULT_MAX_PEER_CONNECTIONS),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-maxreceivebuffer=<n>",
strprintf("Maximum per-connection receive buffer, <n>*1000 "
"bytes (default: %u)",
DEFAULT_MAXRECEIVEBUFFER),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg(
"-maxsendbuffer=<n>",
strprintf(
"Maximum per-connection send buffer, <n>*1000 bytes (default: %u)",
DEFAULT_MAXSENDBUFFER),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg(
"-maxtimeadjustment",
strprintf("Maximum allowed median peer time offset adjustment. Local "
"perspective of time may be influenced by peers forward or "
"backward by this amount. (default: %u seconds)",
DEFAULT_MAX_TIME_ADJUSTMENT),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-onion=<ip:port>",
strprintf("Use separate SOCKS5 proxy to reach peers via Tor "
"hidden services (default: %s)",
"-proxy"),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-onlynet=<net>",
"Only connect to nodes in network <net> (ipv4, ipv6 or onion)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-peerbloomfilters",
strprintf("Support filtering of blocks and transaction with "
"bloom filters (default: %d)",
DEFAULT_PEERBLOOMFILTERS),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-permitbaremultisig",
strprintf("Relay non-P2SH multisig (default: %d)",
DEFAULT_PERMIT_BAREMULTISIG),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-port=<port>",
strprintf("Listen for connections on <port> (default: %u, "
"testnet: %u, regtest: %u)",
defaultChainParams->GetDefaultPort(),
testnetChainParams->GetDefaultPort(),
regtestChainParams->GetDefaultPort()),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-proxy=<ip:port>", _("Connect through SOCKS5 proxy"),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-proxyrandomize",
strprintf("Randomize credentials for every proxy connection. "
"This enables Tor stream isolation (default: %d)",
DEFAULT_PROXYRANDOMIZE),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-seednode=<ip>",
"Connect to a node to retrieve peer addresses, and disconnect",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-timeout=<n>",
strprintf("Specify connection timeout in milliseconds "
"(minimum: 1, default: %d)",
DEFAULT_CONNECT_TIMEOUT),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg(
"-torcontrol=<ip>:<port>",
strprintf(
"Tor control port to use if onion listening enabled (default: %s)",
DEFAULT_TOR_CONTROL),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-torpassword=<pass>",
"Tor control port password (default: empty)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
#ifdef USE_UPNP
#if USE_UPNP
gArgs.AddArg("-upnp",
"Use UPnP to map the listening port (default: 1 when "
"listening and no -proxy)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
#else
gArgs.AddArg(
"-upnp",
strprintf("Use UPnP to map the listening port (default: %u)", 0),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
#endif
#else
hidden_args.emplace_back("-upnp");
@@ -705,7 +709,7 @@
gArgs.AddArg("-whitebind=<addr>",
"Bind to given address and whitelist peers connecting to it. "
"Use [host]:port notation for IPv6",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-whitelist=<IP address or network>",
"Whitelist peers connecting from the given IP address (e.g. "
"1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be "
@@ -713,29 +717,29 @@
"Whitelisted peers cannot be DoS banned and their "
"transactions are always relayed, even if they are already in "
"the mempool, useful e.g. for a gateway",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg(
"-maxuploadtarget=<n>",
strprintf("Tries to keep outbound traffic under the given target (in "
"MiB per 24h), 0 = no limit (default: %d)",
DEFAULT_MAX_UPLOAD_TARGET),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
g_wallet_init_interface.AddWalletOptions();
#if ENABLE_ZMQ
gArgs.AddArg("-zmqpubhashblock=<address>",
"Enable publish hash block in <address>",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::ZMQ);
+ ArgsManager::ALLOW_ANY, OptionsCategory::ZMQ);
gArgs.AddArg("-zmqpubhashtx=<address>",
"Enable publish hash transaction in <address>",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::ZMQ);
+ ArgsManager::ALLOW_ANY, OptionsCategory::ZMQ);
gArgs.AddArg("-zmqpubrawblock=<address>",
"Enable publish raw block in <address>",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::ZMQ);
+ ArgsManager::ALLOW_ANY, OptionsCategory::ZMQ);
gArgs.AddArg("-zmqpubrawtx=<address>",
"Enable publish raw transaction in <address>",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::ZMQ);
+ ArgsManager::ALLOW_ANY, OptionsCategory::ZMQ);
#else
hidden_args.emplace_back("-zmqpubhashblock=<address>");
hidden_args.emplace_back("-zmqpubhashtx=<address>");
@@ -747,7 +751,8 @@
"-checkblocks=<n>",
strprintf("How many blocks to check at startup (default: %u, 0 = all)",
DEFAULT_CHECKBLOCKS),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg(
"-checklevel=<n>",
strprintf("How thorough the block verification of "
@@ -760,7 +765,8 @@
"Each level includes the checks of the previous levels "
"(0-4, default: %u)",
DEFAULT_CHECKLEVEL),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg(
"-checkblockindex",
strprintf("Do a full consistency check for mapBlockIndex, "
@@ -768,63 +774,75 @@
"mapBlocksUnlinked occasionally. (default: %u, regtest: %u)",
defaultChainParams->DefaultConsistencyChecks(),
regtestChainParams->DefaultConsistencyChecks()),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg(
"-checkmempool=<n>",
strprintf(
"Run checks every <n> transactions (default: %u, regtest: %u)",
defaultChainParams->DefaultConsistencyChecks(),
regtestChainParams->DefaultConsistencyChecks()),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-checkpoints",
strprintf("Only accept block chain matching built-in "
"checkpoints (default: %d)",
DEFAULT_CHECKPOINTS_ENABLED),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-deprecatedrpc=<method>",
"Allows deprecated RPC method(s) to be used",
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-dropmessagestest=<n>",
"Randomly drop 1 of every <n> network messages",
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg(
"-stopafterblockimport",
strprintf("Stop running after importing blocks from disk (default: %d)",
DEFAULT_STOPAFTERBLOCKIMPORT),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-stopatheight",
strprintf("Stop running after reaching the given height in "
"the main chain (default: %u)",
DEFAULT_STOPATHEIGHT),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-limitancestorcount=<n>",
strprintf("Do not accept transactions if number of in-mempool "
"ancestors is <n> or more (pre-phonon-upgrade "
"default: %u, post-phonon-upgrade default: %u)",
DEFAULT_ANCESTOR_LIMIT,
DEFAULT_ANCESTOR_LIMIT_LONGER),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg(
"-limitancestorsize=<n>",
strprintf("Do not accept transactions whose size with all in-mempool "
"ancestors exceeds <n> kilobytes (default: %u)",
DEFAULT_ANCESTOR_SIZE_LIMIT),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg(
"-limitdescendantcount=<n>",
strprintf("Do not accept transactions if any ancestor would have <n> "
"or more in-mempool descendants (default pre-phonon-upgrade: "
"%u, default post-phonon-upgrade: %u)",
DEFAULT_DESCENDANT_LIMIT, DEFAULT_DESCENDANT_LIMIT_LONGER),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg(
"-limitdescendantsize=<n>",
strprintf("Do not accept transactions if any ancestor would have more "
"than <n> kilobytes of in-mempool descendants (default: %u).",
DEFAULT_DESCENDANT_SIZE_LIMIT),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-addrmantest", "Allows to test address relay on localhost",
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-debug=<category>",
strprintf("Output debugging information (default: %u, "
@@ -835,73 +853,79 @@
"output all debugging information."
"<category> can be: " +
ListLogCategories() + ".",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
gArgs.AddArg(
"-debugexclude=<category>",
strprintf("Exclude debugging information for a category. Can be used "
"in conjunction with -debug=1 to output debug logs for all "
"categories except one or more specified categories."),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-help-debug",
"Print help message with debugging options and exit",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-logips",
strprintf("Include IP addresses in debug output (default: %d)",
DEFAULT_LOGIPS),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-logtimestamps",
strprintf("Prepend debug output with timestamp (default: %d)",
DEFAULT_LOGTIMESTAMPS),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
gArgs.AddArg(
"-logthreadnames",
strprintf(
"Prepend debug output with name of the originating thread (only "
"available on platforms supporting thread_local) (default: %u)",
DEFAULT_LOGTHREADNAMES),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
gArgs.AddArg(
"-logtimemicros",
strprintf("Add microsecond precision to debug timestamps (default: %d)",
DEFAULT_LOGTIMEMICROS),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg(
"-mocktime=<n>",
"Replace actual time with <n> seconds since epoch (default: 0)",
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg(
"-maxsigcachesize=<n>",
strprintf("Limit size of signature cache to <n> MiB (default: %u)",
DEFAULT_MAX_SIG_CACHE_SIZE),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg(
"-maxscriptcachesize=<n>",
strprintf("Limit size of script cache to <n> MiB (default: %u)",
DEFAULT_MAX_SCRIPT_CACHE_SIZE),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-maxtipage=<n>",
strprintf("Maximum tip age in seconds to consider node in "
"initial block download (default: %u)",
DEFAULT_MAX_TIP_AGE),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg(
"-printtoconsole",
"Send trace/debug info to console instead of debug.log file (default: "
"1 when no -daemon. To disable logging to file, set debuglogfile=0)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-printpriority",
strprintf("Log transaction priority and fee per kB when "
"mining blocks (default: %d)",
DEFAULT_PRINTPRIORITY),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::DEBUG_TEST);
gArgs.AddArg(
"-shrinkdebugfile",
"Shrink debug.log file on client startup (default: 1 when no -debug)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-uacomment=<cmt>", "Append comment to the user agent string",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
SetupChainParamsBaseOptions();
@@ -910,53 +934,56 @@
strprintf(
"Relay and mine \"non-standard\" transactions (%sdefault: %u)",
"testnet/regtest only; ", defaultChainParams->RequireStandard()),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::NODE_RELAY);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::NODE_RELAY);
gArgs.AddArg("-excessiveblocksize=<n>",
strprintf("Do not accept blocks larger than this limit, in "
"bytes (default: %d)",
DEFAULT_MAX_BLOCK_SIZE),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::NODE_RELAY);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::NODE_RELAY);
gArgs.AddArg(
"-dustrelayfee=<amt>",
strprintf("Fee rate (in %s/kB) used to defined dust, the value of an "
"output such that it will cost about 1/3 of its value in "
"fees at this fee rate to spend it. (default: %s)",
CURRENCY_UNIT, FormatMoney(DUST_RELAY_TX_FEE)),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::NODE_RELAY);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::NODE_RELAY);
gArgs.AddArg("-bytespersigop",
strprintf("Equivalent bytes per sigop in transactions for "
"relay and mining (default: %u)",
DEFAULT_BYTES_PER_SIGOP),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::NODE_RELAY);
+ ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY);
gArgs.AddArg(
"-datacarrier",
strprintf("Relay and mine data carrier transactions (default: %d)",
DEFAULT_ACCEPT_DATACARRIER),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::NODE_RELAY);
+ ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY);
gArgs.AddArg("-datacarriersize",
strprintf("Maximum size of data in data carrier transactions "
"we relay and mine (default: %u)",
MAX_OP_RETURN_RELAY),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::NODE_RELAY);
+ ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY);
gArgs.AddArg(
"-minrelaytxfee=<amt>",
strprintf("Fees (in %s/kB) smaller than this are rejected for "
"relaying, mining and transaction creation (default: %s)",
CURRENCY_UNIT, FormatMoney(DEFAULT_MIN_RELAY_TX_FEE_PER_KB)),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::NODE_RELAY);
+ ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY);
gArgs.AddArg(
"-whitelistrelay",
strprintf(_("Accept relayed transactions received from whitelisted "
"peers even when not relaying transactions (default: %d)"),
DEFAULT_WHITELISTRELAY),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::NODE_RELAY);
+ ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY);
gArgs.AddArg(
"-whitelistforcerelay",
strprintf("Force relay of transactions from whitelisted peers even if "
"they violate local relay policy (default: %d)",
DEFAULT_WHITELISTFORCERELAY),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::NODE_RELAY);
+ ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY);
// Not sure this really belongs here, but it will do for now.
// FIXME: This doesn't work anyways.
@@ -964,30 +991,31 @@
strprintf("Fees (in %s/kB) to charge per utxo created for "
"relaying, and mining (default: %s)",
CURRENCY_UNIT, FormatMoney(DEFAULT_UTXO_FEE)),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::NODE_RELAY);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::NODE_RELAY);
gArgs.AddArg("-blockmaxsize=<n>",
strprintf("Set maximum block size in bytes (default: %d)",
DEFAULT_MAX_GENERATED_BLOCK_SIZE),
- ArgsManager::ALLOW_ANY, false,
- OptionsCategory::BLOCK_CREATION);
- gArgs.AddArg(
- "-blockmintxfee=<amt>",
- strprintf("Set lowest fee rate (in %s/kB) for transactions to "
- "be included in block creation. (default: %s)",
- CURRENCY_UNIT, FormatMoney(DEFAULT_BLOCK_MIN_TX_FEE_PER_KB)),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::BLOCK_CREATION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::BLOCK_CREATION);
+ gArgs.AddArg("-blockmintxfee=<amt>",
+ strprintf("Set lowest fee rate (in %s/kB) for transactions to "
+ "be included in block creation. (default: %s)",
+ CURRENCY_UNIT,
+ FormatMoney(DEFAULT_BLOCK_MIN_TX_FEE_PER_KB)),
+ ArgsManager::ALLOW_ANY, OptionsCategory::BLOCK_CREATION);
gArgs.AddArg("-blockversion=<n>",
"Override block version to test forking scenarios",
- ArgsManager::ALLOW_ANY, true, OptionsCategory::BLOCK_CREATION);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::BLOCK_CREATION);
gArgs.AddArg("-server", "Accept command line and JSON-RPC commands",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC);
+ ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
gArgs.AddArg("-rest",
strprintf("Accept public REST requests (default: %d)",
DEFAULT_REST_ENABLE),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC);
+ ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
gArgs.AddArg(
"-rpcbind=<addr>[:port]",
"Bind to given address to listen for JSON-RPC connections. This option "
@@ -996,15 +1024,15 @@
"can be specified multiple times (default: 127.0.0.1 and ::1 i.e., "
"localhost, or if -rpcallowip has been specified, 0.0.0.0 and :: i.e., "
"all addresses)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC);
+ ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
gArgs.AddArg("-rpccookiefile=<loc>",
"Location of the auth cookie. Relative paths will be prefixed "
"by a net-specific datadir location. (default: data dir)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC);
+ ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
gArgs.AddArg("-rpcuser=<user>", _("Username for JSON-RPC connections"),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC);
+ ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
gArgs.AddArg("-rpcpassword=<pw>", _("Password for JSON-RPC connections"),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC);
+ ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
gArgs.AddArg(
"-rpcauth=<userpw>",
"Username and hashed password for JSON-RPC connections. The field "
@@ -1012,45 +1040,47 @@
"python script is included in share/rpcauth. The client then connects "
"normally using the rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of "
"arguments. This option can be specified multiple times",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC);
+ ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
gArgs.AddArg("-rpcport=<port>",
strprintf("Listen for JSON-RPC connections on <port> "
"(default: %u, testnet: %u, regtest: %u)",
defaultBaseParams->RPCPort(),
testnetBaseParams->RPCPort(),
regtestBaseParams->RPCPort()),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC);
+ ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
gArgs.AddArg("-rpcallowip=<ip>",
"Allow JSON-RPC connections from specified source. Valid for "
"<ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. "
"1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). "
"This option can be specified multiple times",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC);
+ ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
gArgs.AddArg(
"-rpcthreads=<n>",
strprintf(
"Set the number of threads to service RPC calls (default: %d)",
DEFAULT_HTTP_THREADS),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC);
+ ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
gArgs.AddArg(
"-rpccorsdomain=value",
"Domain from which to accept cross origin requests (browser enforced)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC);
+ ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
gArgs.AddArg("-rpcworkqueue=<n>",
strprintf("Set the depth of the work queue to service RPC "
"calls (default: %d)",
DEFAULT_HTTP_WORKQUEUE),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::RPC);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::RPC);
gArgs.AddArg("-rpcservertimeout=<n>",
strprintf("Timeout during HTTP requests (default: %d)",
DEFAULT_HTTP_SERVER_TIMEOUT),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::RPC);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::RPC);
#if HAVE_DECL_DAEMON
gArgs.AddArg("-daemon",
_("Run in the background as a daemon and accept commands"),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
#else
hidden_args.emplace_back("-daemon");
#endif
@@ -1059,12 +1089,12 @@
gArgs.AddArg(
"-enableavalanche",
strprintf("Enable avalanche (default: %u)", AVALANCHE_DEFAULT_ENABLED),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::AVALANCHE);
+ ArgsManager::ALLOW_ANY, OptionsCategory::AVALANCHE);
gArgs.AddArg(
"-avacooldown",
strprintf("Mandatory cooldown between two avapoll (default: %u)",
AVALANCHE_DEFAULT_COOLDOWN),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::AVALANCHE);
+ ArgsManager::ALLOW_ANY, OptionsCategory::AVALANCHE);
// Add the hidden options
gArgs.AddHiddenArgs(hidden_args);
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -445,32 +445,34 @@
gArgs.AddArg("-allowselfsignedrootcertificates",
strprintf("Allow self signed root certificates (default: %d)",
DEFAULT_SELFSIGNED_ROOTCERTS),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::GUI);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::GUI);
#endif
gArgs.AddArg("-choosedatadir",
strprintf("Choose data directory on startup (default: %d)",
DEFAULT_CHOOSE_DATADIR),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::GUI);
+ ArgsManager::ALLOW_ANY, OptionsCategory::GUI);
gArgs.AddArg("-lang=<lang>",
"Set language, for example \"de_DE\" (default: system locale)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::GUI);
- gArgs.AddArg("-min", "Start minimized", ArgsManager::ALLOW_ANY, false,
+ ArgsManager::ALLOW_ANY, OptionsCategory::GUI);
+ gArgs.AddArg("-min", "Start minimized", ArgsManager::ALLOW_ANY,
OptionsCategory::GUI);
gArgs.AddArg(
"-rootcertificates=<file>",
"Set SSL root certificates for payment request (default: -system-)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::GUI);
+ ArgsManager::ALLOW_ANY, OptionsCategory::GUI);
gArgs.AddArg("-splash",
strprintf("Show splash screen on startup (default: %d)",
DEFAULT_SPLASHSCREEN),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::GUI);
+ ArgsManager::ALLOW_ANY, OptionsCategory::GUI);
gArgs.AddArg("-resetguisettings", "Reset all settings changed in the GUI",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::GUI);
+ ArgsManager::ALLOW_ANY, OptionsCategory::GUI);
gArgs.AddArg("-uiplatform",
strprintf("Select platform to customize UI for (one of "
"windows, macosx, other; default: %s)",
BitcoinGUI::DEFAULT_UIPLATFORM),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::GUI);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::GUI);
}
#ifndef BITCOIN_QT_TEST
diff --git a/src/rpc/test/server_tests.cpp b/src/rpc/test/server_tests.cpp
--- a/src/rpc/test/server_tests.cpp
+++ b/src/rpc/test/server_tests.cpp
@@ -15,7 +15,7 @@
BOOST_AUTO_TEST_CASE(server_IsDeprecatedRPCEnabled) {
ArgsManager testArgs;
- testArgs.AddArg("-deprecatedrpc", "", ArgsManager::ALLOW_ANY, false,
+ testArgs.AddArg("-deprecatedrpc", "", ArgsManager::ALLOW_ANY,
OptionsCategory::OPTIONS);
const char *argv_test[] = {"bitcoind", "-deprecatedrpc=foo",
diff --git a/src/seeder/main.cpp b/src/seeder/main.cpp
--- a/src/seeder/main.cpp
+++ b/src/seeder/main.cpp
@@ -121,53 +121,46 @@
private:
void SetupSeederArgs() {
gArgs.AddArg("-?", _("Print this help message and exit"),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-version", _("Print version and exit"),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-host=<host>", _("Hostname of the DNS seed"),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-ns=<ns>", _("Hostname of the nameserver"),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-mbox=<mbox>",
_("E-Mail address reported in SOA records"),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-threads=<threads>",
_("Number of crawlers to run in parallel (default 96)"),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-dnsthreads=<threads>",
_("Number of DNS server threads (default 4)"),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-port=<port>", _("UDP port to listen on (default 53)"),
- ArgsManager::ALLOW_ANY, false,
- OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-onion=<ip:port>", _("Tor proxy IP/Port"),
- ArgsManager::ALLOW_ANY, false,
- OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-proxyipv4=<ip:port>", _("IPV4 SOCKS5 proxy IP/Port"),
- ArgsManager::ALLOW_ANY, false,
- OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-proxyipv6=<ip:port>", _("IPV6 SOCKS5 proxy IP/Port"),
- ArgsManager::ALLOW_ANY, false,
- OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-filter=<f1,f2,...>",
_("Allow these flag combinations as filters"),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-wipeban", _("Wipe list of banned nodes"),
- ArgsManager::ALLOW_ANY, false,
- OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg("-wipeignore", _("Wipe list of ignored nodes"),
- ArgsManager::ALLOW_ANY, false,
- OptionsCategory::CONNECTION);
+ ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
gArgs.AddArg(
"-help-debug",
_("Show all debugging options (usage: --help -help-debug)"),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
SetupChainParamsBaseOptions();
- gArgs.AddArg("-help", "", ArgsManager::ALLOW_ANY, false,
- OptionsCategory::HIDDEN);
- gArgs.AddArg("-h", "", ArgsManager::ALLOW_ANY, false,
+ gArgs.AddArg("-help", "", ArgsManager::ALLOW_ANY,
OptionsCategory::HIDDEN);
+ gArgs.AddArg("-h", "", ArgsManager::ALLOW_ANY, OptionsCategory::HIDDEN);
}
};
diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp
--- a/src/test/getarg_tests.cpp
+++ b/src/test/getarg_tests.cpp
@@ -36,8 +36,7 @@
static void SetupArgs(ArgsManager &am, const std::vector<std::string> &args) {
for (const std::string &arg : args) {
- am.AddArg(arg, "", ArgsManager::ALLOW_ANY, false,
- OptionsCategory::OPTIONS);
+ am.AddArg(arg, "", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
}
}
diff --git a/src/test/main.cpp b/src/test/main.cpp
--- a/src/test/main.cpp
+++ b/src/test/main.cpp
@@ -26,7 +26,7 @@
};
for (const auto &arg : testArgs) {
- gArgs.AddArg(arg, "", ArgsManager::ALLOW_ANY, false,
+ gArgs.AddArg(arg, "", ArgsManager::ALLOW_ANY,
OptionsCategory::HIDDEN);
}
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -191,7 +191,7 @@
}
void SetupArgs(int argv, const char *args[]) {
for (int i = 0; i < argv; ++i) {
- AddArg(args[i], "", ArgsManager::ALLOW_ANY, false,
+ AddArg(args[i], "", ArgsManager::ALLOW_ANY,
OptionsCategory::OPTIONS);
}
}
diff --git a/src/util/system.h b/src/util/system.h
--- a/src/util/system.h
+++ b/src/util/system.h
@@ -297,8 +297,7 @@
* Add argument
*/
void AddArg(const std::string &name, const std::string &help,
- unsigned int flags, const bool debug_only,
- const OptionsCategory &cat);
+ unsigned int flags, const OptionsCategory &cat);
// Remove an arg setting, used only in testing
void ClearArg(const std::string &strArg);
diff --git a/src/util/system.cpp b/src/util/system.cpp
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -627,8 +627,7 @@
}
void ArgsManager::AddArg(const std::string &name, const std::string &help,
- unsigned int flags, const bool debug_only,
- const OptionsCategory &cat) {
+ unsigned int flags, const OptionsCategory &cat) {
// Split arg name from its help param
size_t eq_index = name.find('=');
if (eq_index == std::string::npos) {
@@ -637,18 +636,16 @@
LOCK(cs_args);
std::map<std::string, Arg> &arg_map = m_available_args[cat];
- auto ret =
- arg_map.emplace(name.substr(0, eq_index),
- Arg{name.substr(eq_index, name.size() - eq_index), help,
- ArgsManager::NONE, debug_only});
+ auto ret = arg_map.emplace(
+ name.substr(0, eq_index),
+ Arg{name.substr(eq_index, name.size() - eq_index), help, flags, false});
// Make sure an insertion actually happened.
assert(ret.second);
}
void ArgsManager::AddHiddenArgs(const std::vector<std::string> &names) {
for (const std::string &name : names) {
- AddArg(name, "", ArgsManager::ALLOW_ANY, false,
- OptionsCategory::HIDDEN);
+ AddArg(name, "", ArgsManager::ALLOW_ANY, OptionsCategory::HIDDEN);
}
}
@@ -717,7 +714,7 @@
}
for (const auto &arg : arg_map.second) {
- if (show_debug || !arg.second.m_debug_only) {
+ if (show_debug || !(arg.second.m_flags & ArgsManager::DEBUG_ONLY)) {
std::string name;
if (arg.second.m_help_param.empty()) {
name = arg.first;
diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp
--- a/src/wallet/init.cpp
+++ b/src/wallet/init.cpp
@@ -45,57 +45,57 @@
"as suboptimal coin selection may result due to the added "
"limitation (default: %u)",
DEFAULT_AVOIDPARTIALSPENDS),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET);
+ ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
gArgs.AddArg("-disablewallet",
"Do not load the wallet and disable wallet RPC calls",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET);
+ ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
gArgs.AddArg("-fallbackfee=<amt>",
strprintf("A fee rate (in %s/kB) that will be used when fee "
"estimation has insufficient data (default: %s)",
CURRENCY_UNIT, FormatMoney(DEFAULT_FALLBACK_FEE)),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET);
+ ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
gArgs.AddArg("-keypool=<n>",
strprintf("Set key pool size to <n> (default: %u)",
DEFAULT_KEYPOOL_SIZE),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET);
+ ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
gArgs.AddArg(
"-maxtxfee=<amt>",
strprintf("Maximum total fees (in %s) to use in a single wallet "
"transaction or raw transaction; setting this too low may "
"abort large transactions (default: %s)",
CURRENCY_UNIT, FormatMoney(DEFAULT_TRANSACTION_MAXFEE)),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST);
+ ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-mintxfee=<amt>",
strprintf("Fees (in %s/kB) smaller than this are considered "
"zero fee for transaction creation (default: %s)",
CURRENCY_UNIT,
FormatMoney(DEFAULT_TRANSACTION_MINFEE_PER_KB)),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET);
+ ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
gArgs.AddArg(
"-paytxfee=<amt>",
strprintf(
"Fee (in %s/kB) to add to transactions you send (default: %s)",
CURRENCY_UNIT,
FormatMoney(CFeeRate{DEFAULT_PAY_TX_FEE}.GetFeePerK())),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET);
+ ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
gArgs.AddArg(
"-rescan",
"Rescan the block chain for missing wallet transactions on startup",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET);
+ ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
gArgs.AddArg(
"-salvagewallet",
"Attempt to recover private keys from a corrupt wallet on startup",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET);
+ ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
gArgs.AddArg(
"-spendzeroconfchange",
strprintf(
"Spend unconfirmed change when sending transactions (default: %d)",
DEFAULT_SPEND_ZEROCONF_CHANGE),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET);
+ ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
gArgs.AddArg("-upgradewallet", "Upgrade wallet to latest format on startup",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET);
+ ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
gArgs.AddArg("-wallet=<path>",
"Specify wallet database path. Can be specified multiple "
"times to load multiple wallets. Path is interpreted relative "
@@ -103,49 +103,50 @@
"it does not exist (as a directory containing a wallet.dat "
"file and log files). For backwards compatibility this will "
"also accept names of existing data files in <walletdir>.)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET);
+ ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
gArgs.AddArg(
"-walletbroadcast",
strprintf("Make the wallet broadcast transactions (default: %d)",
DEFAULT_WALLETBROADCAST),
- ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET);
+ ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
gArgs.AddArg("-walletdir=<dir>",
"Specify directory to hold wallets (default: "
"<datadir>/wallets if it exists, otherwise <datadir>)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET);
+ ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
gArgs.AddArg("-walletnotify=<cmd>",
"Execute command when a wallet transaction changes (%s in cmd "
"is replaced by TxID)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET);
+ ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
gArgs.AddArg(
"-zapwallettxes=<mode>",
"Delete all wallet transactions and only recover those parts of the "
"blockchain through -rescan on startup (1 = keep tx meta data e.g. "
"payment request information, 2 = drop tx meta data)",
- ArgsManager::ALLOW_ANY, false, OptionsCategory::WALLET);
+ ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
gArgs.AddArg("-dblogsize=<n>",
strprintf("Flush wallet database activity from memory to disk "
"log every <n> megabytes (default: %u)",
DEFAULT_WALLET_DBLOGSIZE),
- ArgsManager::ALLOW_ANY, true,
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
OptionsCategory::WALLET_DEBUG_TEST);
gArgs.AddArg(
"-flushwallet",
strprintf("Run a thread to flush wallet periodically (default: %d)",
DEFAULT_FLUSHWALLET),
- ArgsManager::ALLOW_ANY, true, OptionsCategory::WALLET_DEBUG_TEST);
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
+ OptionsCategory::WALLET_DEBUG_TEST);
gArgs.AddArg("-privdb",
strprintf("Sets the DB_PRIVATE flag in the wallet db "
"environment (default: %d)",
DEFAULT_WALLET_PRIVDB),
- ArgsManager::ALLOW_ANY, true,
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
OptionsCategory::WALLET_DEBUG_TEST);
gArgs.AddArg("-walletrejectlongchains",
strprintf("Wallet will not create transactions that violate "
"mempool chain limits (default: %d)",
DEFAULT_WALLET_REJECT_LONG_CHAINS),
- ArgsManager::ALLOW_ANY, true,
+ ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY,
OptionsCategory::WALLET_DEBUG_TEST);
}

File Metadata

Mime Type
text/plain
Expires
Mon, May 12, 01:42 (21 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5749320
Default Alt Text
D5768.id18951.diff (78 KB)

Event Timeline