Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 388 Lines • ▼ Show 20 Lines | std::vector<std::string> hidden_args = { | ||||
// TODO remove after the May 2020 upgrade | // TODO remove after the May 2020 upgrade | ||||
"-phononactivationtime"}; | "-phononactivationtime"}; | ||||
// Set all of the args and their help | // Set all of the args and their help | ||||
// When adding new options to the categories, please keep and ensure | // When adding new options to the categories, please keep and ensure | ||||
// alphabetical ordering. Do not translate _(...) -help-debug options, Many | // alphabetical ordering. Do not translate _(...) -help-debug options, Many | ||||
// technical terms, and only a very small audience, so is unnecessary stress | // technical terms, and only a very small audience, so is unnecessary stress | ||||
// to translators. | // to translators. | ||||
gArgs.AddArg("-?", "Print this help message and exit", false, | gArgs.AddArg("-?", "Print this help message and exit", | ||||
OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-version", "Print version and exit", false, | gArgs.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY, | ||||
OptionsCategory::OPTIONS); | false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-alertnotify=<cmd>", | gArgs.AddArg("-alertnotify=<cmd>", | ||||
"Execute command when a relevant alert is received or we see " | "Execute command when a relevant alert is received or we see " | ||||
"a really long fork (%s in cmd is replaced by message)", | "a really long fork (%s in cmd is replaced by message)", | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-assumevalid=<hex>", | "-assumevalid=<hex>", | ||||
strprintf( | strprintf( | ||||
"If this block is in the chain assume that it and its ancestors " | "If this block is in the chain assume that it and its ancestors " | ||||
"are valid and potentially skip their script verification (0 to " | "are valid and potentially skip their script verification (0 to " | ||||
"verify all, default: %s, testnet: %s)", | "verify all, default: %s, testnet: %s)", | ||||
defaultChainParams->GetConsensus().defaultAssumeValid.GetHex(), | defaultChainParams->GetConsensus().defaultAssumeValid.GetHex(), | ||||
testnetChainParams->GetConsensus().defaultAssumeValid.GetHex()), | testnetChainParams->GetConsensus().defaultAssumeValid.GetHex()), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-blocksdir=<dir>", | gArgs.AddArg("-blocksdir=<dir>", | ||||
"Specify directory to hold blocks subdirectory for *.dat " | "Specify directory to hold blocks subdirectory for *.dat " | ||||
"files (default: <datadir>)", | "files (default: <datadir>)", | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-blocknotify=<cmd>", | gArgs.AddArg("-blocknotify=<cmd>", | ||||
"Execute command when the best block changes (%s in cmd is " | "Execute command when the best block changes (%s in cmd is " | ||||
"replaced by block hash)", | "replaced by block hash)", | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-blockreconstructionextratxn=<n>", | gArgs.AddArg("-blockreconstructionextratxn=<n>", | ||||
strprintf("Extra transactions to keep in memory for compact " | strprintf("Extra transactions to keep in memory for compact " | ||||
"block reconstructions (default: %u)", | "block reconstructions (default: %u)", | ||||
DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN), | DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-blocksonly", | "-blocksonly", | ||||
strprintf("Whether to operate in a blocks only mode (default: %d)", | strprintf("Whether to operate in a blocks only mode (default: %d)", | ||||
DEFAULT_BLOCKSONLY), | DEFAULT_BLOCKSONLY), | ||||
true, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, true, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-conf=<file>", | gArgs.AddArg("-conf=<file>", | ||||
strprintf("Specify configuration file. Relative paths will be " | strprintf("Specify configuration file. Relative paths will be " | ||||
"prefixed by datadir location. (default: %s)", | "prefixed by datadir location. (default: %s)", | ||||
BITCOIN_CONF_FILENAME), | BITCOIN_CONF_FILENAME), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-datadir=<dir>", "Specify data directory", false, | gArgs.AddArg("-datadir=<dir>", "Specify data directory", | ||||
OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-dbbatchsize", | "-dbbatchsize", | ||||
strprintf("Maximum database write batch size in bytes (default: %u)", | strprintf("Maximum database write batch size in bytes (default: %u)", | ||||
nDefaultDbBatchSize), | nDefaultDbBatchSize), | ||||
true, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, true, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-dbcache=<n>", | "-dbcache=<n>", | ||||
strprintf( | strprintf( | ||||
"Set database cache size in megabytes (%d to %d, default: %d)", | "Set database cache size in megabytes (%d to %d, default: %d)", | ||||
nMinDbCache, nMaxDbCache, nDefaultDbCache), | nMinDbCache, nMaxDbCache, nDefaultDbCache), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-debuglogfile=<file>", | gArgs.AddArg("-debuglogfile=<file>", | ||||
strprintf("Specify location of debug log file. Relative paths " | strprintf("Specify location of debug log file. Relative paths " | ||||
"will be prefixed by a net-specific datadir " | "will be prefixed by a net-specific datadir " | ||||
"location. (0 to disable; default: %s)", | "location. (0 to disable; default: %s)", | ||||
DEFAULT_DEBUGLOGFILE), | DEFAULT_DEBUGLOGFILE), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-feefilter", | gArgs.AddArg("-feefilter", | ||||
strprintf("Tell other nodes to filter invs to us by our " | strprintf("Tell other nodes to filter invs to us by our " | ||||
"mempool min fee (default: %d)", | "mempool min fee (default: %d)", | ||||
DEFAULT_FEEFILTER), | DEFAULT_FEEFILTER), | ||||
true, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, true, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-finalizationdelay=<n>", | gArgs.AddArg("-finalizationdelay=<n>", | ||||
strprintf("Set the minimum amount of time to wait between a " | strprintf("Set the minimum amount of time to wait between a " | ||||
"block header reception and the block finalization. " | "block header reception and the block finalization. " | ||||
"Unit is seconds (default: %d)", | "Unit is seconds (default: %d)", | ||||
DEFAULT_MIN_FINALIZATION_DELAY), | DEFAULT_MIN_FINALIZATION_DELAY), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-includeconf=<file>", | "-includeconf=<file>", | ||||
"Specify additional configuration file, relative to the -datadir path " | "Specify additional configuration file, relative to the -datadir path " | ||||
"(only useable from configuration file, not command line)", | "(only useable from configuration file, not command line)", | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-maxreorgdepth=<n>", | gArgs.AddArg("-maxreorgdepth=<n>", | ||||
strprintf("Configure at what depth blocks are considered " | strprintf("Configure at what depth blocks are considered " | ||||
"final (default: %d). Use -1 to disable.", | "final (default: %d). Use -1 to disable.", | ||||
DEFAULT_MAX_REORG_DEPTH), | DEFAULT_MAX_REORG_DEPTH), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-loadblock=<file>", | gArgs.AddArg("-loadblock=<file>", | ||||
"Imports blocks from external blk000??.dat file on startup", | "Imports blocks from external blk000??.dat file on startup", | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-maxmempool=<n>", | gArgs.AddArg("-maxmempool=<n>", | ||||
strprintf("Keep the transaction memory pool below <n> " | strprintf("Keep the transaction memory pool below <n> " | ||||
"megabytes (default: %u)", | "megabytes (default: %u)", | ||||
DEFAULT_MAX_MEMPOOL_SIZE), | DEFAULT_MAX_MEMPOOL_SIZE), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-maxorphantx=<n>", | gArgs.AddArg("-maxorphantx=<n>", | ||||
strprintf("Keep at most <n> unconnectable transactions in " | strprintf("Keep at most <n> unconnectable transactions in " | ||||
"memory (default: %u)", | "memory (default: %u)", | ||||
DEFAULT_MAX_ORPHAN_TRANSACTIONS), | DEFAULT_MAX_ORPHAN_TRANSACTIONS), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-mempoolexpiry=<n>", | gArgs.AddArg("-mempoolexpiry=<n>", | ||||
strprintf("Do not keep transactions in the mempool longer " | strprintf("Do not keep transactions in the mempool longer " | ||||
"than <n> hours (default: %u)", | "than <n> hours (default: %u)", | ||||
DEFAULT_MEMPOOL_EXPIRY), | DEFAULT_MEMPOOL_EXPIRY), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-minimumchainwork=<hex>", | "-minimumchainwork=<hex>", | ||||
strprintf( | strprintf( | ||||
"Minimum work assumed to exist on a valid chain in hex " | "Minimum work assumed to exist on a valid chain in hex " | ||||
"(default: %s, testnet: %s)", | "(default: %s, testnet: %s)", | ||||
defaultChainParams->GetConsensus().nMinimumChainWork.GetHex(), | defaultChainParams->GetConsensus().nMinimumChainWork.GetHex(), | ||||
testnetChainParams->GetConsensus().nMinimumChainWork.GetHex()), | testnetChainParams->GetConsensus().nMinimumChainWork.GetHex()), | ||||
true, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, true, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-par=<n>", | "-par=<n>", | ||||
strprintf("Set the number of script verification threads (%u to %d, 0 " | strprintf("Set the number of script verification threads (%u to %d, 0 " | ||||
"= auto, <0 = leave that many cores free, default: %d)", | "= auto, <0 = leave that many cores free, default: %d)", | ||||
-GetNumCores(), MAX_SCRIPTCHECK_THREADS, | -GetNumCores(), MAX_SCRIPTCHECK_THREADS, | ||||
DEFAULT_SCRIPTCHECK_THREADS), | DEFAULT_SCRIPTCHECK_THREADS), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-persistmempool", | gArgs.AddArg("-persistmempool", | ||||
strprintf("Whether to save the mempool on shutdown and load " | strprintf("Whether to save the mempool on shutdown and load " | ||||
"on restart (default: %u)", | "on restart (default: %u)", | ||||
DEFAULT_PERSIST_MEMPOOL), | DEFAULT_PERSIST_MEMPOOL), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-pid=<file>", | gArgs.AddArg("-pid=<file>", | ||||
strprintf("Specify pid file. Relative paths will be prefixed " | strprintf("Specify pid file. Relative paths will be prefixed " | ||||
"by a net-specific datadir location. (default: %s)", | "by a net-specific datadir location. (default: %s)", | ||||
BITCOIN_PID_FILENAME), | BITCOIN_PID_FILENAME), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-prune=<n>", | "-prune=<n>", | ||||
strprintf("Reduce storage requirements by enabling pruning (deleting) " | strprintf("Reduce storage requirements by enabling pruning (deleting) " | ||||
"of old blocks. This allows the pruneblockchain RPC to be " | "of old blocks. This allows the pruneblockchain RPC to be " | ||||
"called to delete specific blocks, and enables automatic " | "called to delete specific blocks, and enables automatic " | ||||
"pruning of old blocks if a target size in MiB is provided. " | "pruning of old blocks if a target size in MiB is provided. " | ||||
"This mode is incompatible with -txindex and -rescan. " | "This mode is incompatible with -txindex and -rescan. " | ||||
"Warning: Reverting this setting requires re-downloading the " | "Warning: Reverting this setting requires re-downloading the " | ||||
"entire blockchain. (default: 0 = disable pruning blocks, 1 " | "entire blockchain. (default: 0 = disable pruning blocks, 1 " | ||||
"= allow manual pruning via RPC, >=%u = automatically prune " | "= allow manual pruning via RPC, >=%u = automatically prune " | ||||
"block files to stay under the specified target size in MiB)", | "block files to stay under the specified target size in MiB)", | ||||
MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024), | MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-reindex-chainstate", | gArgs.AddArg("-reindex-chainstate", | ||||
"Rebuild chain state from the currently indexed blocks. When " | "Rebuild chain state from the currently indexed blocks. When " | ||||
"in pruning mode or if blocks on disk might be corrupted, use " | "in pruning mode or if blocks on disk might be corrupted, use " | ||||
"full -reindex instead.", | "full -reindex instead.", | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-reindex", | "-reindex", | ||||
"Rebuild chain state and block index from the blk*.dat files on disk", | "Rebuild chain state and block index from the blk*.dat files on disk", | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
#ifndef WIN32 | #ifndef WIN32 | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-sysperms", | "-sysperms", | ||||
"Create new files with system default permissions, instead of umask " | "Create new files with system default permissions, instead of umask " | ||||
"077 (only effective with disabled wallet functionality)", | "077 (only effective with disabled wallet functionality)", | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
#else | #else | ||||
hidden_args.emplace_back("-sysperms"); | hidden_args.emplace_back("-sysperms"); | ||||
#endif | #endif | ||||
gArgs.AddArg("-txindex", | gArgs.AddArg("-txindex", | ||||
strprintf("Maintain a full transaction index, used by the " | strprintf("Maintain a full transaction index, used by the " | ||||
"getrawtransaction rpc call (default: %d)", | "getrawtransaction rpc call (default: %d)", | ||||
DEFAULT_TXINDEX), | DEFAULT_TXINDEX), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-usecashaddr", | gArgs.AddArg("-usecashaddr", | ||||
"Use Cash Address for destination encoding instead of base58 " | "Use Cash Address for destination encoding instead of base58 " | ||||
"(activate by default on Jan, 14)", | "(activate by default on Jan, 14)", | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-addnode=<ip>", | gArgs.AddArg("-addnode=<ip>", | ||||
"Add a node to connect to and attempt to keep the connection " | "Add a node to connect to and attempt to keep the connection " | ||||
"open (see the `addnode` RPC command help for more info)", | "open (see the `addnode` RPC command help for more info)", | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-banscore=<n>", | "-banscore=<n>", | ||||
strprintf("Threshold for disconnecting misbehaving peers (default: %u)", | strprintf("Threshold for disconnecting misbehaving peers (default: %u)", | ||||
DEFAULT_BANSCORE_THRESHOLD), | DEFAULT_BANSCORE_THRESHOLD), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-bantime=<n>", | gArgs.AddArg("-bantime=<n>", | ||||
strprintf("Number of seconds to keep misbehaving peers from " | strprintf("Number of seconds to keep misbehaving peers from " | ||||
"reconnecting (default: %u)", | "reconnecting (default: %u)", | ||||
DEFAULT_MISBEHAVING_BANTIME), | DEFAULT_MISBEHAVING_BANTIME), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-bind=<addr>", | gArgs.AddArg("-bind=<addr>", | ||||
"Bind to given address and always listen on it. Use " | "Bind to given address and always listen on it. Use " | ||||
"[host]:port notation for IPv6", | "[host]:port notation for IPv6", | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-connect=<ip>", | "-connect=<ip>", | ||||
"Connect only to the specified node(s); -connect=0 disables automatic " | "Connect only to the specified node(s); -connect=0 disables automatic " | ||||
"connections (the rules for this peer are the same as for -addnode)", | "connections (the rules for this peer are the same as for -addnode)", | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-discover", | gArgs.AddArg("-discover", | ||||
"Discover own IP addresses (default: 1 when listening and no " | "Discover own IP addresses (default: 1 when listening and no " | ||||
"-externalip or -proxy)", | "-externalip or -proxy)", | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-dns", | gArgs.AddArg("-dns", | ||||
strprintf("Allow DNS lookups for -addnode, -seednode and " | strprintf("Allow DNS lookups for -addnode, -seednode and " | ||||
"-connect (default: %d)", | "-connect (default: %d)", | ||||
DEFAULT_NAME_LOOKUP), | DEFAULT_NAME_LOOKUP), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-dnsseed", | gArgs.AddArg("-dnsseed", | ||||
"Query for peer addresses via DNS lookup, if low on addresses " | "Query for peer addresses via DNS lookup, if low on addresses " | ||||
"(default: 1 unless -connect used)", | "(default: 1 unless -connect used)", | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-enablebip61", | gArgs.AddArg("-enablebip61", | ||||
strprintf("Send reject messages per BIP61 (default: %u)", | strprintf("Send reject messages per BIP61 (default: %u)", | ||||
DEFAULT_ENABLE_BIP61), | DEFAULT_ENABLE_BIP61), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-externalip=<ip>", "Specify your own public address", false, | gArgs.AddArg("-externalip=<ip>", "Specify your own public address", | ||||
OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-forcednsseed", | "-forcednsseed", | ||||
strprintf( | strprintf( | ||||
"Always query for peer addresses via DNS lookup (default: %d)", | "Always query for peer addresses via DNS lookup (default: %d)", | ||||
DEFAULT_FORCEDNSSEED), | DEFAULT_FORCEDNSSEED), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-listen", | "-listen", | ||||
"Accept connections from outside (default: 1 if no -proxy or -connect)", | "Accept connections from outside (default: 1 if no -proxy or -connect)", | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-listenonion", | "-listenonion", | ||||
strprintf("Automatically create Tor hidden service (default: %d)", | strprintf("Automatically create Tor hidden service (default: %d)", | ||||
DEFAULT_LISTEN_ONION), | DEFAULT_LISTEN_ONION), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-maxconnections=<n>", | "-maxconnections=<n>", | ||||
strprintf("Maintain at most <n> connections to peers (default: %u)", | strprintf("Maintain at most <n> connections to peers (default: %u)", | ||||
DEFAULT_MAX_PEER_CONNECTIONS), | DEFAULT_MAX_PEER_CONNECTIONS), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-maxreceivebuffer=<n>", | gArgs.AddArg("-maxreceivebuffer=<n>", | ||||
strprintf("Maximum per-connection receive buffer, <n>*1000 " | strprintf("Maximum per-connection receive buffer, <n>*1000 " | ||||
"bytes (default: %u)", | "bytes (default: %u)", | ||||
DEFAULT_MAXRECEIVEBUFFER), | DEFAULT_MAXRECEIVEBUFFER), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-maxsendbuffer=<n>", | "-maxsendbuffer=<n>", | ||||
strprintf( | strprintf( | ||||
"Maximum per-connection send buffer, <n>*1000 bytes (default: %u)", | "Maximum per-connection send buffer, <n>*1000 bytes (default: %u)", | ||||
DEFAULT_MAXSENDBUFFER), | DEFAULT_MAXSENDBUFFER), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-maxtimeadjustment", | "-maxtimeadjustment", | ||||
strprintf("Maximum allowed median peer time offset adjustment. Local " | strprintf("Maximum allowed median peer time offset adjustment. Local " | ||||
"perspective of time may be influenced by peers forward or " | "perspective of time may be influenced by peers forward or " | ||||
"backward by this amount. (default: %u seconds)", | "backward by this amount. (default: %u seconds)", | ||||
DEFAULT_MAX_TIME_ADJUSTMENT), | DEFAULT_MAX_TIME_ADJUSTMENT), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-onion=<ip:port>", | gArgs.AddArg("-onion=<ip:port>", | ||||
strprintf("Use separate SOCKS5 proxy to reach peers via Tor " | strprintf("Use separate SOCKS5 proxy to reach peers via Tor " | ||||
"hidden services (default: %s)", | "hidden services (default: %s)", | ||||
"-proxy"), | "-proxy"), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-onlynet=<net>", | gArgs.AddArg("-onlynet=<net>", | ||||
"Only connect to nodes in network <net> (ipv4, ipv6 or onion)", | "Only connect to nodes in network <net> (ipv4, ipv6 or onion)", | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-peerbloomfilters", | gArgs.AddArg("-peerbloomfilters", | ||||
strprintf("Support filtering of blocks and transaction with " | strprintf("Support filtering of blocks and transaction with " | ||||
"bloom filters (default: %d)", | "bloom filters (default: %d)", | ||||
DEFAULT_PEERBLOOMFILTERS), | DEFAULT_PEERBLOOMFILTERS), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-permitbaremultisig", | gArgs.AddArg("-permitbaremultisig", | ||||
strprintf("Relay non-P2SH multisig (default: %d)", | strprintf("Relay non-P2SH multisig (default: %d)", | ||||
DEFAULT_PERMIT_BAREMULTISIG), | DEFAULT_PERMIT_BAREMULTISIG), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-port=<port>", | gArgs.AddArg("-port=<port>", | ||||
strprintf("Listen for connections on <port> (default: %u, " | strprintf("Listen for connections on <port> (default: %u, " | ||||
"testnet: %u, regtest: %u)", | "testnet: %u, regtest: %u)", | ||||
defaultChainParams->GetDefaultPort(), | defaultChainParams->GetDefaultPort(), | ||||
testnetChainParams->GetDefaultPort(), | testnetChainParams->GetDefaultPort(), | ||||
regtestChainParams->GetDefaultPort()), | regtestChainParams->GetDefaultPort()), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-proxy=<ip:port>", _("Connect through SOCKS5 proxy"), false, | gArgs.AddArg("-proxy=<ip:port>", _("Connect through SOCKS5 proxy"), | ||||
OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-proxyrandomize", | gArgs.AddArg("-proxyrandomize", | ||||
strprintf("Randomize credentials for every proxy connection. " | strprintf("Randomize credentials for every proxy connection. " | ||||
"This enables Tor stream isolation (default: %d)", | "This enables Tor stream isolation (default: %d)", | ||||
DEFAULT_PROXYRANDOMIZE), | DEFAULT_PROXYRANDOMIZE), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-seednode=<ip>", | gArgs.AddArg("-seednode=<ip>", | ||||
"Connect to a node to retrieve peer addresses, and disconnect", | "Connect to a node to retrieve peer addresses, and disconnect", | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-timeout=<n>", | gArgs.AddArg("-timeout=<n>", | ||||
strprintf("Specify connection timeout in milliseconds " | strprintf("Specify connection timeout in milliseconds " | ||||
"(minimum: 1, default: %d)", | "(minimum: 1, default: %d)", | ||||
DEFAULT_CONNECT_TIMEOUT), | DEFAULT_CONNECT_TIMEOUT), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-torcontrol=<ip>:<port>", | "-torcontrol=<ip>:<port>", | ||||
strprintf( | strprintf( | ||||
"Tor control port to use if onion listening enabled (default: %s)", | "Tor control port to use if onion listening enabled (default: %s)", | ||||
DEFAULT_TOR_CONTROL), | DEFAULT_TOR_CONTROL), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-torpassword=<pass>", | gArgs.AddArg("-torpassword=<pass>", | ||||
"Tor control port password (default: empty)", false, | "Tor control port password (default: empty)", | ||||
OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
#ifdef USE_UPNP | #ifdef USE_UPNP | ||||
#if USE_UPNP | #if USE_UPNP | ||||
gArgs.AddArg("-upnp", | gArgs.AddArg("-upnp", | ||||
"Use UPnP to map the listening port (default: 1 when " | "Use UPnP to map the listening port (default: 1 when " | ||||
"listening and no -proxy)", | "listening and no -proxy)", | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
#else | #else | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-upnp", | "-upnp", | ||||
strprintf("Use UPnP to map the listening port (default: %u)", 0), false, | strprintf("Use UPnP to map the listening port (default: %u)", 0), | ||||
OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
#endif | #endif | ||||
#else | #else | ||||
hidden_args.emplace_back("-upnp"); | hidden_args.emplace_back("-upnp"); | ||||
#endif | #endif | ||||
gArgs.AddArg("-whitebind=<addr>", | gArgs.AddArg("-whitebind=<addr>", | ||||
"Bind to given address and whitelist peers connecting to it. " | "Bind to given address and whitelist peers connecting to it. " | ||||
"Use [host]:port notation for IPv6", | "Use [host]:port notation for IPv6", | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-whitelist=<IP address or network>", | gArgs.AddArg("-whitelist=<IP address or network>", | ||||
"Whitelist peers connecting from the given IP address (e.g. " | "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 " | "1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be " | ||||
"specified multiple times. " | "specified multiple times. " | ||||
"Whitelisted peers cannot be DoS banned and their " | "Whitelisted peers cannot be DoS banned and their " | ||||
"transactions are always relayed, even if they are already in " | "transactions are always relayed, even if they are already in " | ||||
"the mempool, useful e.g. for a gateway", | "the mempool, useful e.g. for a gateway", | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-maxuploadtarget=<n>", | "-maxuploadtarget=<n>", | ||||
strprintf("Tries to keep outbound traffic under the given target (in " | strprintf("Tries to keep outbound traffic under the given target (in " | ||||
"MiB per 24h), 0 = no limit (default: %d)", | "MiB per 24h), 0 = no limit (default: %d)", | ||||
DEFAULT_MAX_UPLOAD_TARGET), | DEFAULT_MAX_UPLOAD_TARGET), | ||||
false, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, false, OptionsCategory::CONNECTION); | ||||
g_wallet_init_interface.AddWalletOptions(); | g_wallet_init_interface.AddWalletOptions(); | ||||
#if ENABLE_ZMQ | #if ENABLE_ZMQ | ||||
gArgs.AddArg("-zmqpubhashblock=<address>", | gArgs.AddArg("-zmqpubhashblock=<address>", | ||||
"Enable publish hash block in <address>", false, | "Enable publish hash block in <address>", | ||||
OptionsCategory::ZMQ); | ArgsManager::ALLOW_ANY, false, OptionsCategory::ZMQ); | ||||
gArgs.AddArg("-zmqpubhashtx=<address>", | gArgs.AddArg("-zmqpubhashtx=<address>", | ||||
"Enable publish hash transaction in <address>", false, | "Enable publish hash transaction in <address>", | ||||
OptionsCategory::ZMQ); | ArgsManager::ALLOW_ANY, false, OptionsCategory::ZMQ); | ||||
gArgs.AddArg("-zmqpubrawblock=<address>", | gArgs.AddArg("-zmqpubrawblock=<address>", | ||||
"Enable publish raw block in <address>", false, | "Enable publish raw block in <address>", | ||||
OptionsCategory::ZMQ); | ArgsManager::ALLOW_ANY, false, OptionsCategory::ZMQ); | ||||
gArgs.AddArg("-zmqpubrawtx=<address>", | gArgs.AddArg("-zmqpubrawtx=<address>", | ||||
"Enable publish raw transaction in <address>", false, | "Enable publish raw transaction in <address>", | ||||
OptionsCategory::ZMQ); | ArgsManager::ALLOW_ANY, false, OptionsCategory::ZMQ); | ||||
#else | #else | ||||
hidden_args.emplace_back("-zmqpubhashblock=<address>"); | hidden_args.emplace_back("-zmqpubhashblock=<address>"); | ||||
hidden_args.emplace_back("-zmqpubhashtx=<address>"); | hidden_args.emplace_back("-zmqpubhashtx=<address>"); | ||||
hidden_args.emplace_back("-zmqpubrawblock=<address>"); | hidden_args.emplace_back("-zmqpubrawblock=<address>"); | ||||
hidden_args.emplace_back("-zmqpubrawtx=<address>"); | hidden_args.emplace_back("-zmqpubrawtx=<address>"); | ||||
#endif | #endif | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-checkblocks=<n>", | "-checkblocks=<n>", | ||||
strprintf("How many blocks to check at startup (default: %u, 0 = all)", | strprintf("How many blocks to check at startup (default: %u, 0 = all)", | ||||
DEFAULT_CHECKBLOCKS), | DEFAULT_CHECKBLOCKS), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-checklevel=<n>", | "-checklevel=<n>", | ||||
strprintf("How thorough the block verification of " | strprintf("How thorough the block verification of " | ||||
"-checkblocks is: " | "-checkblocks is: " | ||||
"level 0 reads the blocks from disk, " | "level 0 reads the blocks from disk, " | ||||
"level 1 verifies block validity, " | "level 1 verifies block validity, " | ||||
"level 2 verifies undo data, " | "level 2 verifies undo data, " | ||||
"level 3 checks disconnection of tip blocks, " | "level 3 checks disconnection of tip blocks, " | ||||
"and level 4 tries to reconnect the blocks. " | "and level 4 tries to reconnect the blocks. " | ||||
"Each level includes the checks of the previous levels " | "Each level includes the checks of the previous levels " | ||||
"(0-4, default: %u)", | "(0-4, default: %u)", | ||||
DEFAULT_CHECKLEVEL), | DEFAULT_CHECKLEVEL), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-checkblockindex", | "-checkblockindex", | ||||
strprintf("Do a full consistency check for mapBlockIndex, " | strprintf("Do a full consistency check for mapBlockIndex, " | ||||
"setBlockIndexCandidates, ::ChainActive() and " | "setBlockIndexCandidates, ::ChainActive() and " | ||||
"mapBlocksUnlinked occasionally. (default: %u, regtest: %u)", | "mapBlocksUnlinked occasionally. (default: %u, regtest: %u)", | ||||
defaultChainParams->DefaultConsistencyChecks(), | defaultChainParams->DefaultConsistencyChecks(), | ||||
regtestChainParams->DefaultConsistencyChecks()), | regtestChainParams->DefaultConsistencyChecks()), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-checkmempool=<n>", | "-checkmempool=<n>", | ||||
strprintf( | strprintf( | ||||
"Run checks every <n> transactions (default: %u, regtest: %u)", | "Run checks every <n> transactions (default: %u, regtest: %u)", | ||||
defaultChainParams->DefaultConsistencyChecks(), | defaultChainParams->DefaultConsistencyChecks(), | ||||
regtestChainParams->DefaultConsistencyChecks()), | regtestChainParams->DefaultConsistencyChecks()), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-checkpoints", | gArgs.AddArg("-checkpoints", | ||||
strprintf("Only accept block chain matching built-in " | strprintf("Only accept block chain matching built-in " | ||||
"checkpoints (default: %d)", | "checkpoints (default: %d)", | ||||
DEFAULT_CHECKPOINTS_ENABLED), | DEFAULT_CHECKPOINTS_ENABLED), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-deprecatedrpc=<method>", | gArgs.AddArg("-deprecatedrpc=<method>", | ||||
"Allows deprecated RPC method(s) to be used", true, | "Allows deprecated RPC method(s) to be used", | ||||
OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-dropmessagestest=<n>", | gArgs.AddArg("-dropmessagestest=<n>", | ||||
"Randomly drop 1 of every <n> network messages", true, | "Randomly drop 1 of every <n> network messages", | ||||
OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-stopafterblockimport", | "-stopafterblockimport", | ||||
strprintf("Stop running after importing blocks from disk (default: %d)", | strprintf("Stop running after importing blocks from disk (default: %d)", | ||||
DEFAULT_STOPAFTERBLOCKIMPORT), | DEFAULT_STOPAFTERBLOCKIMPORT), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-stopatheight", | gArgs.AddArg("-stopatheight", | ||||
strprintf("Stop running after reaching the given height in " | strprintf("Stop running after reaching the given height in " | ||||
"the main chain (default: %u)", | "the main chain (default: %u)", | ||||
DEFAULT_STOPATHEIGHT), | DEFAULT_STOPATHEIGHT), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-limitancestorcount=<n>", | gArgs.AddArg("-limitancestorcount=<n>", | ||||
strprintf("Do not accept transactions if number of in-mempool " | strprintf("Do not accept transactions if number of in-mempool " | ||||
"ancestors is <n> or more (pre-phonon-upgrade " | "ancestors is <n> or more (pre-phonon-upgrade " | ||||
"default: %u, post-phonon-upgrade default: %u)", | "default: %u, post-phonon-upgrade default: %u)", | ||||
DEFAULT_ANCESTOR_LIMIT, | DEFAULT_ANCESTOR_LIMIT, | ||||
DEFAULT_ANCESTOR_LIMIT_LONGER), | DEFAULT_ANCESTOR_LIMIT_LONGER), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-limitancestorsize=<n>", | "-limitancestorsize=<n>", | ||||
strprintf("Do not accept transactions whose size with all in-mempool " | strprintf("Do not accept transactions whose size with all in-mempool " | ||||
"ancestors exceeds <n> kilobytes (default: %u)", | "ancestors exceeds <n> kilobytes (default: %u)", | ||||
DEFAULT_ANCESTOR_SIZE_LIMIT), | DEFAULT_ANCESTOR_SIZE_LIMIT), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-limitdescendantcount=<n>", | "-limitdescendantcount=<n>", | ||||
strprintf("Do not accept transactions if any ancestor would have <n> " | strprintf("Do not accept transactions if any ancestor would have <n> " | ||||
"or more in-mempool descendants (default pre-phonon-upgrade: " | "or more in-mempool descendants (default pre-phonon-upgrade: " | ||||
"%u, default post-phonon-upgrade: %u)", | "%u, default post-phonon-upgrade: %u)", | ||||
DEFAULT_DESCENDANT_LIMIT, DEFAULT_DESCENDANT_LIMIT_LONGER), | DEFAULT_DESCENDANT_LIMIT, DEFAULT_DESCENDANT_LIMIT_LONGER), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-limitdescendantsize=<n>", | "-limitdescendantsize=<n>", | ||||
strprintf("Do not accept transactions if any ancestor would have more " | strprintf("Do not accept transactions if any ancestor would have more " | ||||
"than <n> kilobytes of in-mempool descendants (default: %u).", | "than <n> kilobytes of in-mempool descendants (default: %u).", | ||||
DEFAULT_DESCENDANT_SIZE_LIMIT), | DEFAULT_DESCENDANT_SIZE_LIMIT), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-addrmantest", "Allows to test address relay on localhost", | gArgs.AddArg("-addrmantest", "Allows to test address relay on localhost", | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-debug=<category>", | gArgs.AddArg("-debug=<category>", | ||||
strprintf("Output debugging information (default: %u, " | strprintf("Output debugging information (default: %u, " | ||||
"supplying <category> is optional)", | "supplying <category> is optional)", | ||||
0) + | 0) + | ||||
". " + | ". " + | ||||
"If <category> is not supplied or if <category> = 1, " | "If <category> is not supplied or if <category> = 1, " | ||||
"output all debugging information." | "output all debugging information." | ||||
"<category> can be: " + | "<category> can be: " + | ||||
ListLogCategories() + ".", | ListLogCategories() + ".", | ||||
false, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-debugexclude=<category>", | "-debugexclude=<category>", | ||||
strprintf("Exclude debugging information for a category. Can be used " | strprintf("Exclude debugging information for a category. Can be used " | ||||
"in conjunction with -debug=1 to output debug logs for all " | "in conjunction with -debug=1 to output debug logs for all " | ||||
"categories except one or more specified categories."), | "categories except one or more specified categories."), | ||||
false, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-help-debug", | gArgs.AddArg("-help-debug", | ||||
"Print help message with debugging options and exit", false, | "Print help message with debugging options and exit", | ||||
OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-logips", | gArgs.AddArg("-logips", | ||||
strprintf("Include IP addresses in debug output (default: %d)", | strprintf("Include IP addresses in debug output (default: %d)", | ||||
DEFAULT_LOGIPS), | DEFAULT_LOGIPS), | ||||
false, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-logtimestamps", | gArgs.AddArg("-logtimestamps", | ||||
strprintf("Prepend debug output with timestamp (default: %d)", | strprintf("Prepend debug output with timestamp (default: %d)", | ||||
DEFAULT_LOGTIMESTAMPS), | DEFAULT_LOGTIMESTAMPS), | ||||
false, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-logthreadnames", | "-logthreadnames", | ||||
strprintf( | strprintf( | ||||
"Prepend debug output with name of the originating thread (only " | "Prepend debug output with name of the originating thread (only " | ||||
"available on platforms supporting thread_local) (default: %u)", | "available on platforms supporting thread_local) (default: %u)", | ||||
DEFAULT_LOGTHREADNAMES), | DEFAULT_LOGTHREADNAMES), | ||||
false, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-logtimemicros", | "-logtimemicros", | ||||
strprintf("Add microsecond precision to debug timestamps (default: %d)", | strprintf("Add microsecond precision to debug timestamps (default: %d)", | ||||
DEFAULT_LOGTIMEMICROS), | DEFAULT_LOGTIMEMICROS), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-mocktime=<n>", | "-mocktime=<n>", | ||||
"Replace actual time with <n> seconds since epoch (default: 0)", true, | "Replace actual time with <n> seconds since epoch (default: 0)", | ||||
OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-maxsigcachesize=<n>", | "-maxsigcachesize=<n>", | ||||
strprintf("Limit size of signature cache to <n> MiB (default: %u)", | strprintf("Limit size of signature cache to <n> MiB (default: %u)", | ||||
DEFAULT_MAX_SIG_CACHE_SIZE), | DEFAULT_MAX_SIG_CACHE_SIZE), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-maxscriptcachesize=<n>", | "-maxscriptcachesize=<n>", | ||||
strprintf("Limit size of script cache to <n> MiB (default: %u)", | strprintf("Limit size of script cache to <n> MiB (default: %u)", | ||||
DEFAULT_MAX_SCRIPT_CACHE_SIZE), | DEFAULT_MAX_SCRIPT_CACHE_SIZE), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-maxtipage=<n>", | gArgs.AddArg("-maxtipage=<n>", | ||||
strprintf("Maximum tip age in seconds to consider node in " | strprintf("Maximum tip age in seconds to consider node in " | ||||
"initial block download (default: %u)", | "initial block download (default: %u)", | ||||
DEFAULT_MAX_TIP_AGE), | DEFAULT_MAX_TIP_AGE), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-printtoconsole", | "-printtoconsole", | ||||
"Send trace/debug info to console instead of debug.log file (default: " | "Send trace/debug info to console instead of debug.log file (default: " | ||||
"1 when no -daemon. To disable logging to file, set debuglogfile=0)", | "1 when no -daemon. To disable logging to file, set debuglogfile=0)", | ||||
false, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-printpriority", | gArgs.AddArg("-printpriority", | ||||
strprintf("Log transaction priority and fee per kB when " | strprintf("Log transaction priority and fee per kB when " | ||||
"mining blocks (default: %d)", | "mining blocks (default: %d)", | ||||
DEFAULT_PRINTPRIORITY), | DEFAULT_PRINTPRIORITY), | ||||
true, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-shrinkdebugfile", | "-shrinkdebugfile", | ||||
"Shrink debug.log file on client startup (default: 1 when no -debug)", | "Shrink debug.log file on client startup (default: 1 when no -debug)", | ||||
false, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-uacomment=<cmt>", "Append comment to the user agent string", | gArgs.AddArg("-uacomment=<cmt>", "Append comment to the user agent string", | ||||
false, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST); | ||||
SetupChainParamsBaseOptions(); | SetupChainParamsBaseOptions(); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-acceptnonstdtxn", | "-acceptnonstdtxn", | ||||
strprintf( | strprintf( | ||||
"Relay and mine \"non-standard\" transactions (%sdefault: %u)", | "Relay and mine \"non-standard\" transactions (%sdefault: %u)", | ||||
"testnet/regtest only; ", defaultChainParams->RequireStandard()), | "testnet/regtest only; ", defaultChainParams->RequireStandard()), | ||||
true, OptionsCategory::NODE_RELAY); | ArgsManager::ALLOW_ANY, true, OptionsCategory::NODE_RELAY); | ||||
gArgs.AddArg("-excessiveblocksize=<n>", | gArgs.AddArg("-excessiveblocksize=<n>", | ||||
strprintf("Do not accept blocks larger than this limit, in " | strprintf("Do not accept blocks larger than this limit, in " | ||||
"bytes (default: %d)", | "bytes (default: %d)", | ||||
DEFAULT_MAX_BLOCK_SIZE), | DEFAULT_MAX_BLOCK_SIZE), | ||||
true, OptionsCategory::NODE_RELAY); | ArgsManager::ALLOW_ANY, true, OptionsCategory::NODE_RELAY); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-dustrelayfee=<amt>", | "-dustrelayfee=<amt>", | ||||
strprintf("Fee rate (in %s/kB) used to defined dust, the value of an " | 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 " | "output such that it will cost about 1/3 of its value in " | ||||
"fees at this fee rate to spend it. (default: %s)", | "fees at this fee rate to spend it. (default: %s)", | ||||
CURRENCY_UNIT, FormatMoney(DUST_RELAY_TX_FEE)), | CURRENCY_UNIT, FormatMoney(DUST_RELAY_TX_FEE)), | ||||
true, OptionsCategory::NODE_RELAY); | ArgsManager::ALLOW_ANY, true, OptionsCategory::NODE_RELAY); | ||||
gArgs.AddArg("-bytespersigop", | gArgs.AddArg("-bytespersigop", | ||||
strprintf("Equivalent bytes per sigop in transactions for " | strprintf("Equivalent bytes per sigop in transactions for " | ||||
"relay and mining (default: %u)", | "relay and mining (default: %u)", | ||||
DEFAULT_BYTES_PER_SIGOP), | DEFAULT_BYTES_PER_SIGOP), | ||||
false, OptionsCategory::NODE_RELAY); | ArgsManager::ALLOW_ANY, false, OptionsCategory::NODE_RELAY); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-datacarrier", | "-datacarrier", | ||||
strprintf("Relay and mine data carrier transactions (default: %d)", | strprintf("Relay and mine data carrier transactions (default: %d)", | ||||
DEFAULT_ACCEPT_DATACARRIER), | DEFAULT_ACCEPT_DATACARRIER), | ||||
false, OptionsCategory::NODE_RELAY); | ArgsManager::ALLOW_ANY, false, OptionsCategory::NODE_RELAY); | ||||
gArgs.AddArg("-datacarriersize", | gArgs.AddArg("-datacarriersize", | ||||
strprintf("Maximum size of data in data carrier transactions " | strprintf("Maximum size of data in data carrier transactions " | ||||
"we relay and mine (default: %u)", | "we relay and mine (default: %u)", | ||||
MAX_OP_RETURN_RELAY), | MAX_OP_RETURN_RELAY), | ||||
false, OptionsCategory::NODE_RELAY); | ArgsManager::ALLOW_ANY, false, OptionsCategory::NODE_RELAY); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-minrelaytxfee=<amt>", | "-minrelaytxfee=<amt>", | ||||
strprintf("Fees (in %s/kB) smaller than this are rejected for " | strprintf("Fees (in %s/kB) smaller than this are rejected for " | ||||
"relaying, mining and transaction creation (default: %s)", | "relaying, mining and transaction creation (default: %s)", | ||||
CURRENCY_UNIT, FormatMoney(DEFAULT_MIN_RELAY_TX_FEE_PER_KB)), | CURRENCY_UNIT, FormatMoney(DEFAULT_MIN_RELAY_TX_FEE_PER_KB)), | ||||
false, OptionsCategory::NODE_RELAY); | ArgsManager::ALLOW_ANY, false, OptionsCategory::NODE_RELAY); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-whitelistrelay", | "-whitelistrelay", | ||||
strprintf(_("Accept relayed transactions received from whitelisted " | strprintf(_("Accept relayed transactions received from whitelisted " | ||||
"peers even when not relaying transactions (default: %d)"), | "peers even when not relaying transactions (default: %d)"), | ||||
DEFAULT_WHITELISTRELAY), | DEFAULT_WHITELISTRELAY), | ||||
false, OptionsCategory::NODE_RELAY); | ArgsManager::ALLOW_ANY, false, OptionsCategory::NODE_RELAY); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-whitelistforcerelay", | "-whitelistforcerelay", | ||||
strprintf("Force relay of transactions from whitelisted peers even if " | strprintf("Force relay of transactions from whitelisted peers even if " | ||||
"they violate local relay policy (default: %d)", | "they violate local relay policy (default: %d)", | ||||
DEFAULT_WHITELISTFORCERELAY), | DEFAULT_WHITELISTFORCERELAY), | ||||
false, OptionsCategory::NODE_RELAY); | ArgsManager::ALLOW_ANY, false, OptionsCategory::NODE_RELAY); | ||||
// Not sure this really belongs here, but it will do for now. | // Not sure this really belongs here, but it will do for now. | ||||
// FIXME: This doesn't work anyways. | // FIXME: This doesn't work anyways. | ||||
gArgs.AddArg("-excessutxocharge=<amt>", | gArgs.AddArg("-excessutxocharge=<amt>", | ||||
strprintf("Fees (in %s/kB) to charge per utxo created for " | strprintf("Fees (in %s/kB) to charge per utxo created for " | ||||
"relaying, and mining (default: %s)", | "relaying, and mining (default: %s)", | ||||
CURRENCY_UNIT, FormatMoney(DEFAULT_UTXO_FEE)), | CURRENCY_UNIT, FormatMoney(DEFAULT_UTXO_FEE)), | ||||
true, OptionsCategory::NODE_RELAY); | ArgsManager::ALLOW_ANY, true, OptionsCategory::NODE_RELAY); | ||||
gArgs.AddArg("-blockmaxsize=<n>", | gArgs.AddArg("-blockmaxsize=<n>", | ||||
strprintf("Set maximum block size in bytes (default: %d)", | strprintf("Set maximum block size in bytes (default: %d)", | ||||
DEFAULT_MAX_GENERATED_BLOCK_SIZE), | DEFAULT_MAX_GENERATED_BLOCK_SIZE), | ||||
false, OptionsCategory::BLOCK_CREATION); | ArgsManager::ALLOW_ANY, false, | ||||
gArgs.AddArg("-blockmintxfee=<amt>", | OptionsCategory::BLOCK_CREATION); | ||||
gArgs.AddArg( | |||||
"-blockmintxfee=<amt>", | |||||
strprintf("Set lowest fee rate (in %s/kB) for transactions to " | strprintf("Set lowest fee rate (in %s/kB) for transactions to " | ||||
"be included in block creation. (default: %s)", | "be included in block creation. (default: %s)", | ||||
CURRENCY_UNIT, | CURRENCY_UNIT, FormatMoney(DEFAULT_BLOCK_MIN_TX_FEE_PER_KB)), | ||||
FormatMoney(DEFAULT_BLOCK_MIN_TX_FEE_PER_KB)), | ArgsManager::ALLOW_ANY, false, OptionsCategory::BLOCK_CREATION); | ||||
false, OptionsCategory::BLOCK_CREATION); | |||||
gArgs.AddArg("-blockversion=<n>", | gArgs.AddArg("-blockversion=<n>", | ||||
"Override block version to test forking scenarios", true, | "Override block version to test forking scenarios", | ||||
OptionsCategory::BLOCK_CREATION); | ArgsManager::ALLOW_ANY, true, OptionsCategory::BLOCK_CREATION); | ||||
gArgs.AddArg("-server", "Accept command line and JSON-RPC commands", false, | gArgs.AddArg("-server", "Accept command line and JSON-RPC commands", | ||||
OptionsCategory::RPC); | ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC); | ||||
gArgs.AddArg("-rest", | gArgs.AddArg("-rest", | ||||
strprintf("Accept public REST requests (default: %d)", | strprintf("Accept public REST requests (default: %d)", | ||||
DEFAULT_REST_ENABLE), | DEFAULT_REST_ENABLE), | ||||
false, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-rpcbind=<addr>[:port]", | "-rpcbind=<addr>[:port]", | ||||
"Bind to given address to listen for JSON-RPC connections. This option " | "Bind to given address to listen for JSON-RPC connections. This option " | ||||
"is ignored unless -rpcallowip is also passed. Port is optional and " | "is ignored unless -rpcallowip is also passed. Port is optional and " | ||||
"overrides -rpcport. Use [host]:port notation for IPv6. This option " | "overrides -rpcport. Use [host]:port notation for IPv6. This option " | ||||
"can be specified multiple times (default: 127.0.0.1 and ::1 i.e., " | "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., " | "localhost, or if -rpcallowip has been specified, 0.0.0.0 and :: i.e., " | ||||
"all addresses)", | "all addresses)", | ||||
false, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC); | ||||
gArgs.AddArg("-rpccookiefile=<loc>", | gArgs.AddArg("-rpccookiefile=<loc>", | ||||
"Location of the auth cookie. Relative paths will be prefixed " | "Location of the auth cookie. Relative paths will be prefixed " | ||||
"by a net-specific datadir location. (default: data dir)", | "by a net-specific datadir location. (default: data dir)", | ||||
false, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC); | ||||
gArgs.AddArg("-rpcuser=<user>", _("Username for JSON-RPC connections"), | gArgs.AddArg("-rpcuser=<user>", _("Username for JSON-RPC connections"), | ||||
false, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC); | ||||
gArgs.AddArg("-rpcpassword=<pw>", _("Password for JSON-RPC connections"), | gArgs.AddArg("-rpcpassword=<pw>", _("Password for JSON-RPC connections"), | ||||
false, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-rpcauth=<userpw>", | "-rpcauth=<userpw>", | ||||
"Username and hashed password for JSON-RPC connections. The field " | "Username and hashed password for JSON-RPC connections. The field " | ||||
"<userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical " | "<userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical " | ||||
"python script is included in share/rpcauth. The client then connects " | "python script is included in share/rpcauth. The client then connects " | ||||
"normally using the rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of " | "normally using the rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of " | ||||
"arguments. This option can be specified multiple times", | "arguments. This option can be specified multiple times", | ||||
false, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC); | ||||
gArgs.AddArg("-rpcport=<port>", | gArgs.AddArg("-rpcport=<port>", | ||||
strprintf("Listen for JSON-RPC connections on <port> " | strprintf("Listen for JSON-RPC connections on <port> " | ||||
"(default: %u, testnet: %u, regtest: %u)", | "(default: %u, testnet: %u, regtest: %u)", | ||||
defaultBaseParams->RPCPort(), | defaultBaseParams->RPCPort(), | ||||
testnetBaseParams->RPCPort(), | testnetBaseParams->RPCPort(), | ||||
regtestBaseParams->RPCPort()), | regtestBaseParams->RPCPort()), | ||||
false, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC); | ||||
gArgs.AddArg("-rpcallowip=<ip>", | gArgs.AddArg("-rpcallowip=<ip>", | ||||
"Allow JSON-RPC connections from specified source. Valid for " | "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. " | "<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). " | "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", | "This option can be specified multiple times", | ||||
false, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-rpcthreads=<n>", | "-rpcthreads=<n>", | ||||
strprintf( | strprintf( | ||||
"Set the number of threads to service RPC calls (default: %d)", | "Set the number of threads to service RPC calls (default: %d)", | ||||
DEFAULT_HTTP_THREADS), | DEFAULT_HTTP_THREADS), | ||||
false, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-rpccorsdomain=value", | "-rpccorsdomain=value", | ||||
"Domain from which to accept cross origin requests (browser enforced)", | "Domain from which to accept cross origin requests (browser enforced)", | ||||
false, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY, false, OptionsCategory::RPC); | ||||
gArgs.AddArg("-rpcworkqueue=<n>", | gArgs.AddArg("-rpcworkqueue=<n>", | ||||
strprintf("Set the depth of the work queue to service RPC " | strprintf("Set the depth of the work queue to service RPC " | ||||
"calls (default: %d)", | "calls (default: %d)", | ||||
DEFAULT_HTTP_WORKQUEUE), | DEFAULT_HTTP_WORKQUEUE), | ||||
true, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY, true, OptionsCategory::RPC); | ||||
gArgs.AddArg("-rpcservertimeout=<n>", | gArgs.AddArg("-rpcservertimeout=<n>", | ||||
strprintf("Timeout during HTTP requests (default: %d)", | strprintf("Timeout during HTTP requests (default: %d)", | ||||
DEFAULT_HTTP_SERVER_TIMEOUT), | DEFAULT_HTTP_SERVER_TIMEOUT), | ||||
true, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY, true, OptionsCategory::RPC); | ||||
#if HAVE_DECL_DAEMON | #if HAVE_DECL_DAEMON | ||||
gArgs.AddArg("-daemon", | gArgs.AddArg("-daemon", | ||||
_("Run in the background as a daemon and accept commands"), | _("Run in the background as a daemon and accept commands"), | ||||
false, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | ||||
#else | #else | ||||
hidden_args.emplace_back("-daemon"); | hidden_args.emplace_back("-daemon"); | ||||
#endif | #endif | ||||
// Avalanche options. | // Avalanche options. | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-enableavalanche", | "-enableavalanche", | ||||
strprintf("Enable avalanche (default: %u)", AVALANCHE_DEFAULT_ENABLED), | strprintf("Enable avalanche (default: %u)", AVALANCHE_DEFAULT_ENABLED), | ||||
false, OptionsCategory::AVALANCHE); | ArgsManager::ALLOW_ANY, false, OptionsCategory::AVALANCHE); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-avacooldown", | "-avacooldown", | ||||
strprintf("Mandatory cooldown between two avapoll (default: %u)", | strprintf("Mandatory cooldown between two avapoll (default: %u)", | ||||
AVALANCHE_DEFAULT_COOLDOWN), | AVALANCHE_DEFAULT_COOLDOWN), | ||||
false, OptionsCategory::AVALANCHE); | ArgsManager::ALLOW_ANY, false, OptionsCategory::AVALANCHE); | ||||
// Add the hidden options | // Add the hidden options | ||||
gArgs.AddHiddenArgs(hidden_args); | gArgs.AddHiddenArgs(hidden_args); | ||||
} | } | ||||
std::string LicenseInfo() { | std::string LicenseInfo() { | ||||
const std::string URL_SOURCE_CODE = | const std::string URL_SOURCE_CODE = | ||||
"<https://github.com/Bitcoin-ABC/bitcoin-abc>"; | "<https://github.com/Bitcoin-ABC/bitcoin-abc>"; | ||||
▲ Show 20 Lines • Show All 1,518 Lines • Show Last 20 Lines |