// When adding new options to the categories, please keep and ensure alphabetical ordering.
// Do not translate _(...) -help-debug options, Many technical terms, and only a very small audience, so is unnecessary stress to translators.
stringstrUsage=HelpMessageGroup(_("Options:"));
strUsage+=HelpMessageOpt("-?",_("Print this help message and exit"));
strUsage+=HelpMessageOpt("-version",_("Print version and exit"));
strUsage+=HelpMessageOpt("-alertnotify=<cmd>",_("Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)"));
strUsage+=HelpMessageOpt("-blocknotify=<cmd>",_("Execute command when the best block changes (%s in cmd is replaced by block hash)"));
if(showDebug)
strUsage+=HelpMessageOpt("-blocksonly",strprintf(_("Whether to operate in a blocks only mode (default: %u)"),DEFAULT_BLOCKSONLY));
strUsage+=HelpMessageOpt("-checkblocks=<n>",strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"),DEFAULT_CHECKBLOCKS));
strUsage+=HelpMessageOpt("-checklevel=<n>",strprintf(_("How thorough the block verification of -checkblocks is (0-4, default: %u)"),DEFAULT_CHECKLEVEL));
strUsage+=HelpMessageOpt("-daemon",_("Run in the background as a daemon and accept commands"));
#endif
}
strUsage+=HelpMessageOpt("-datadir=<dir>",_("Specify data directory"));
strUsage+=HelpMessageOpt("-dbcache=<n>",strprintf(_("Set database cache size in megabytes (%d to %d, default: %d)"),nMinDbCache,nMaxDbCache,nDefaultDbCache));
if(showDebug)
strUsage+=HelpMessageOpt("-feefilter",strprintf("Tell other nodes to filter invs to us by our mempool min fee (default: %u)",DEFAULT_FEEFILTER));
strUsage+=HelpMessageOpt("-loadblock=<file>",_("Imports blocks from external blk000??.dat file on startup"));
strUsage+=HelpMessageOpt("-maxorphantx=<n>",strprintf(_("Keep at most <n> unconnectable transactions in memory (default: %u)"),DEFAULT_MAX_ORPHAN_TRANSACTIONS));
strUsage+=HelpMessageOpt("-maxmempool=<n>",strprintf(_("Keep the transaction memory pool below <n> megabytes (default: %u)"),DEFAULT_MAX_MEMPOOL_SIZE));
strUsage+=HelpMessageOpt("-mempoolexpiry=<n>",strprintf(_("Do not keep transactions in the mempool longer than <n> hours (default: %u)"),DEFAULT_MEMPOOL_EXPIRY));
strUsage+=HelpMessageOpt("-par=<n>",strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"),
strUsage+=HelpMessageOpt("-prune=<n>",strprintf(_("Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan. "
"Warning: Reverting this setting requires re-downloading the entire blockchain. "
"(default: 0 = disable pruning blocks, >%u = target size in MiB to use for block files)"),MIN_DISK_SPACE_FOR_BLOCK_FILES/1024/1024));
strUsage+=HelpMessageOpt("-reindex-chainstate",_("Rebuild chain state from the currently indexed blocks"));
strUsage+=HelpMessageOpt("-reindex",_("Rebuild chain state and block index from the blk*.dat files on disk"));
#ifndef WIN32
strUsage+=HelpMessageOpt("-sysperms",_("Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)"));
#endif
strUsage+=HelpMessageOpt("-txindex",strprintf(_("Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)"),DEFAULT_TXINDEX));
strUsage+=HelpMessageOpt("-addnode=<ip>",_("Add a node to connect to and attempt to keep the connection open"));
strUsage+=HelpMessageOpt("-banscore=<n>",strprintf(_("Threshold for disconnecting misbehaving peers (default: %u)"),DEFAULT_BANSCORE_THRESHOLD));
strUsage+=HelpMessageOpt("-bantime=<n>",strprintf(_("Number of seconds to keep misbehaving peers from reconnecting (default: %u)"),DEFAULT_MISBEHAVING_BANTIME));
strUsage+=HelpMessageOpt("-bind=<addr>",_("Bind to given address and always listen on it. Use [host]:port notation for IPv6"));
strUsage+=HelpMessageOpt("-connect=<ip>",_("Connect only to the specified node(s)"));
strUsage+=HelpMessageOpt("-discover",_("Discover own IP addresses (default: 1 when listening and no -externalip or -proxy)"));
strUsage+=HelpMessageOpt("-dns",_("Allow DNS lookups for -addnode, -seednode and -connect")+" "+strprintf(_("(default: %u)"),DEFAULT_NAME_LOOKUP));
strUsage+=HelpMessageOpt("-dnsseed",_("Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)"));
strUsage+=HelpMessageOpt("-externalip=<ip>",_("Specify your own public address"));
strUsage+=HelpMessageOpt("-forcednsseed",strprintf(_("Always query for peer addresses via DNS lookup (default: %u)"),DEFAULT_FORCEDNSSEED));
strUsage+=HelpMessageOpt("-listen",_("Accept connections from outside (default: 1 if no -proxy or -connect)"));
strUsage+=HelpMessageOpt("-listenonion",strprintf(_("Automatically create Tor hidden service (default: %d)"),DEFAULT_LISTEN_ONION));
strUsage+=HelpMessageOpt("-maxconnections=<n>",strprintf(_("Maintain at most <n> connections to peers (default: %u)"),DEFAULT_MAX_PEER_CONNECTIONS));
strUsage+=HelpMessageOpt("-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));
strUsage+=HelpMessageOpt("-onion=<ip:port>",strprintf(_("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)"),"-proxy"));
strUsage+=HelpMessageOpt("-onlynet=<net>",_("Only connect to nodes in network <net> (ipv4, ipv6 or onion)"));
strUsage+=HelpMessageOpt("-peerbloomfilters",strprintf(_("Support filtering of blocks and transaction with bloom filters (default: %u)"),DEFAULT_PEERBLOOMFILTERS));
strUsage+=HelpMessageOpt("-port=<port>",strprintf(_("Listen for connections on <port> (default: %u or testnet: %u)"),Params(CBaseChainParams::MAIN).GetDefaultPort(),Params(CBaseChainParams::TESTNET).GetDefaultPort()));
strUsage+=HelpMessageOpt("-proxy=<ip:port>",_("Connect through SOCKS5 proxy"));
strUsage+=HelpMessageOpt("-proxyrandomize",strprintf(_("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)"),DEFAULT_PROXYRANDOMIZE));
strUsage+=HelpMessageOpt("-seednode=<ip>",_("Connect to a node to retrieve peer addresses, and disconnect"));
strUsage+=HelpMessageOpt("-timeout=<n>",strprintf(_("Specify connection timeout in milliseconds (minimum: 1, default: %d)"),DEFAULT_CONNECT_TIMEOUT));
strUsage+=HelpMessageOpt("-torcontrol=<ip>:<port>",strprintf(_("Tor control port to use if onion listening enabled (default: %s)"),DEFAULT_TOR_CONTROL));
strUsage+=HelpMessageOpt("-torpassword=<pass>",_("Tor control port password (default: empty)"));
#ifdef USE_UPNP
#if USE_UPNP
strUsage+=HelpMessageOpt("-upnp",_("Use UPnP to map the listening port (default: 1 when listening and no -proxy)"));
#else
strUsage+=HelpMessageOpt("-upnp",strprintf(_("Use UPnP to map the listening port (default: %u)"),0));
#endif
#endif
strUsage+=HelpMessageOpt("-whitebind=<addr>",_("Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6"));
strUsage+=HelpMessageOpt("-whitelist=<netmask>",_("Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.")+
" "+_("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"));
strUsage+=HelpMessageOpt("-whitelistrelay",strprintf(_("Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d)"),DEFAULT_WHITELISTRELAY));
strUsage+=HelpMessageOpt("-whitelistforcerelay",strprintf(_("Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)"),DEFAULT_WHITELISTFORCERELAY));
strUsage+=HelpMessageOpt("-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));
strUsage+=HelpMessageOpt("-uacomment=<cmt>",_("Append comment to the user agent string"));
if(showDebug)
{
strUsage+=HelpMessageOpt("-checkblockindex",strprintf("Do a full consistency check for mapBlockIndex, setBlockIndexCandidates, chainActive and mapBlocksUnlinked occasionally. Also sets -checkmempool (default: %u)",Params(CBaseChainParams::MAIN).DefaultConsistencyChecks()));
strUsage+=HelpMessageOpt("-checkmempool=<n>",strprintf("Run checks every <n> transactions (default: %u)",Params(CBaseChainParams::MAIN).DefaultConsistencyChecks()));
strUsage+=HelpMessageOpt("-checkpoints",strprintf("Disable expensive verification for known chain history (default: %u)",DEFAULT_CHECKPOINTS_ENABLED));
strUsage+=HelpMessageOpt("-disablesafemode",strprintf("Disable safemode, override a real safe mode event (default: %u)",DEFAULT_DISABLE_SAFEMODE));
strUsage+=HelpMessageOpt("-dropmessagestest=<n>","Randomly drop 1 of every <n> network messages");
strUsage+=HelpMessageOpt("-fuzzmessagestest=<n>","Randomly fuzz 1 of every <n> network messages");
strUsage+=HelpMessageOpt("-stopafterblockimport",strprintf("Stop running after importing blocks from disk (default: %u)",DEFAULT_STOPAFTERBLOCKIMPORT));
strUsage+=HelpMessageOpt("-limitancestorcount=<n>",strprintf("Do not accept transactions if number of in-mempool ancestors is <n> or more (default: %u)",DEFAULT_ANCESTOR_LIMIT));
strUsage+=HelpMessageOpt("-limitancestorsize=<n>",strprintf("Do not accept transactions whose size with all in-mempool ancestors exceeds <n> kilobytes (default: %u)",DEFAULT_ANCESTOR_SIZE_LIMIT));
strUsage+=HelpMessageOpt("-limitdescendantcount=<n>",strprintf("Do not accept transactions if any ancestor would have <n> or more in-mempool descendants (default: %u)",DEFAULT_DESCENDANT_LIMIT));
strUsage+=HelpMessageOpt("-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));
strUsage+=HelpMessageOpt("-debug=<category>",strprintf(_("Output debugging information (default: %u, supplying <category> is optional)"),0)+". "+
_("If <category> is not supplied or if <category> = 1, output all debugging information.")+_("<category> can be:")+" "+debugCategories+".");
if(showDebug)
strUsage+=HelpMessageOpt("-nodebug","Turn off debugging messages, same as -debug=0");
strUsage+=HelpMessageOpt("-help-debug",_("Show all debugging options (usage: --help -help-debug)"));
strUsage+=HelpMessageOpt("-logips",strprintf(_("Include IP addresses in debug output (default: %u)"),DEFAULT_LOGIPS));
strUsage+=HelpMessageOpt("-logtimestamps",strprintf(_("Prepend debug output with timestamp (default: %u)"),DEFAULT_LOGTIMESTAMPS));
if(showDebug)
{
strUsage+=HelpMessageOpt("-logtimemicros",strprintf("Add microsecond precision to debug timestamps (default: %u)",DEFAULT_LOGTIMEMICROS));
strUsage+=HelpMessageOpt("-mocktime=<n>","Replace actual time with <n> seconds since epoch (default: 0)");
strUsage+=HelpMessageOpt("-limitfreerelay=<n>",strprintf("Continuously rate-limit free transactions to <n>*1000 bytes per minute (default: %u)",DEFAULT_LIMITFREERELAY));
strUsage+=HelpMessageOpt("-relaypriority",strprintf("Require high priority for relaying free or low-fee transactions (default: %u)",DEFAULT_RELAYPRIORITY));
strUsage+=HelpMessageOpt("-maxsigcachesize=<n>",strprintf("Limit size of signature cache to <n> MiB (default: %u)",DEFAULT_MAX_SIG_CACHE_SIZE));
strUsage+=HelpMessageOpt("-maxtipage=<n>",strprintf("Maximum tip age in seconds to consider node in initial block download (default: %u)",DEFAULT_MAX_TIP_AGE));
}
strUsage+=HelpMessageOpt("-minrelaytxfee=<amt>",strprintf(_("Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s)"),
strUsage+=HelpMessageOpt("-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)"),
strUsage+=HelpMessageOpt("-printtoconsole",_("Send trace/debug info to console instead of debug.log file"));
if(showDebug)
{
strUsage+=HelpMessageOpt("-printpriority",strprintf("Log transaction priority and fee per kB when mining blocks (default: %u)",DEFAULT_PRINTPRIORITY));
}
strUsage+=HelpMessageOpt("-shrinkdebugfile",_("Shrink debug.log file on client startup (default: 1 when no -debug)"));
strUsage+=HelpMessageOpt("-acceptnonstdtxn",strprintf("Relay and mine \"non-standard\" transactions (%sdefault: %u)","testnet/regtest only; ",!Params(CBaseChainParams::TESTNET).RequireStandard()));
strUsage+=HelpMessageOpt("-bytespersigop",strprintf(_("Minimum bytes per sigop in transactions we relay and mine (default: %u)"),DEFAULT_BYTES_PER_SIGOP));
strUsage+=HelpMessageOpt("-datacarrier",strprintf(_("Relay and mine data carrier transactions (default: %u)"),DEFAULT_ACCEPT_DATACARRIER));
strUsage+=HelpMessageOpt("-datacarriersize",strprintf(_("Maximum size of data in data carrier transactions we relay and mine (default: %u)"),MAX_OP_RETURN_RELAY));
strUsage+=HelpMessageOpt("-mempoolreplacement",strprintf(_("Enable transaction replacement in the memory pool (default: %u)"),DEFAULT_ENABLE_REPLACEMENT));
strUsage+=HelpMessageOpt("-blockmaxcost=<n>",strprintf(_("Set maximum block cost (default: %d)"),DEFAULT_BLOCK_MAX_COST));
strUsage+=HelpMessageOpt("-blockmaxsize=<n>",strprintf(_("Set maximum block size in bytes (default: %d)"),DEFAULT_BLOCK_MAX_SIZE));
strUsage+=HelpMessageOpt("-blockprioritysize=<n>",strprintf(_("Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"),DEFAULT_BLOCK_PRIORITY_SIZE));
if(showDebug)
strUsage+=HelpMessageOpt("-blockversion=<n>","Override block version to test forking scenarios");
strUsage+=HelpMessageGroup(_("RPC server options:"));
strUsage+=HelpMessageOpt("-server",_("Accept command line and JSON-RPC commands"));
strUsage+=HelpMessageOpt("-rest",strprintf(_("Accept public REST requests (default: %u)"),DEFAULT_REST_ENABLE));
strUsage+=HelpMessageOpt("-rpcbind=<addr>",_("Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)"));
strUsage+=HelpMessageOpt("-rpccookiefile=<loc>",_("Location of the auth cookie (default: data dir)"));
strUsage+=HelpMessageOpt("-rpcuser=<user>",_("Username for JSON-RPC connections"));
strUsage+=HelpMessageOpt("-rpcpassword=<pw>",_("Password for JSON-RPC connections"));
strUsage+=HelpMessageOpt("-rpcauth=<userpw>",_("Username and hashed password for JSON-RPC connections. The field <userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is included in share/rpcuser. This option can be specified multiple times"));
strUsage+=HelpMessageOpt("-rpcport=<port>",strprintf(_("Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"),BaseParams(CBaseChainParams::MAIN).RPCPort(),BaseParams(CBaseChainParams::TESTNET).RPCPort()));
strUsage+=HelpMessageOpt("-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"));
strUsage+=HelpMessageOpt("-rpcthreads=<n>",strprintf(_("Set the number of threads to service RPC calls (default: %d)"),DEFAULT_HTTP_THREADS));
if(showDebug){
strUsage+=HelpMessageOpt("-rpcworkqueue=<n>",strprintf("Set the depth of the work queue to service RPC calls (default: %d)",DEFAULT_HTTP_WORKQUEUE));
strUsage+=HelpMessageOpt("-rpcservertimeout=<n>",strprintf("Timeout during HTTP requests (default: %d)",DEFAULT_HTTP_SERVER_TIMEOUT));
strprintf(_("Please contribute if you find %s useful. "
"Visit %s for further information about the software."),
PACKAGE_NAME,URL_WEBSITE)+
"\n"+
strprintf(_("The source code is available from %s."),
URL_SOURCE_CODE)+
"\n"+
"\n"+
_("This is experimental software.")+"\n"+
_("Distributed under the MIT software license, see the accompanying file COPYING or <http://www.opensource.org/licenses/mit-license.php>.")+"\n"+
"\n"+
_("This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.")+
returnInitError(strprintf(_("Cannot obtain a lock on data directory %s. %s is probably already running.")+" %s.",strDataDir,_(PACKAGE_NAME),e.what()));