| 278 | } |
| 279 | |
| 280 | std::string HelpMessage(HelpMessageMode mode) |
| 281 | { |
| 282 | const bool showDebug = GetBoolArg("-help-debug", false); |
| 283 | |
| 284 | // When adding new options to the categories, please keep and ensure alphabetical ordering. |
| 285 | // Do not translate _(...) -help-debug options, Many technical terms, and only a very small audience, so is unnecessary stress to translators |
| 286 | |
| 287 | string strUsage = HelpMessageGroup(_("Options:")); |
| 288 | strUsage += HelpMessageOpt("-?", _("This help message")); |
| 289 | 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)")); |
| 290 | strUsage += HelpMessageOpt("-blocknotify=<cmd>", _("Execute command when the best block changes (%s in cmd is replaced by block hash)")); |
| 291 | strUsage += HelpMessageOpt("-checkblocks=<n>", strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), DEFAULT_CHECKBLOCKS)); |
| 292 | strUsage += HelpMessageOpt("-checklevel=<n>", strprintf(_("How thorough the block verification of -checkblocks is (0-4, default: %u)"), DEFAULT_CHECKLEVEL)); |
| 293 | strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), "bitcoin.conf")); |
| 294 | if (mode == HMM_BITCOIND) |
| 295 | { |
| 296 | #if !defined(WIN32) |
| 297 | strUsage += HelpMessageOpt("-daemon", _("Run in the background as a daemon and accept commands")); |
| 298 | #endif |
| 299 | } |
| 300 | strUsage += HelpMessageOpt("-datadir=<dir>", _("Specify data directory")); |
| 301 | strUsage += HelpMessageOpt("-dbcache=<n>", strprintf(_("Set database cache size in megabytes (%d to %d, default: %d)"), nMinDbCache, nMaxDbCache, nDefaultDbCache)); |
| 302 | strUsage += HelpMessageOpt("-loadblock=<file>", _("Imports blocks from external blk000??.dat file") + " " + _("on startup")); |
| 303 | strUsage += HelpMessageOpt("-maxorphantx=<n>", strprintf(_("Keep at most <n> unconnectable transactions in memory (default: %u)"), DEFAULT_MAX_ORPHAN_TRANSACTIONS)); |
| 304 | strUsage += HelpMessageOpt("-maxmempool=<n>", strprintf(_("Keep the transaction memory pool below <n> megabytes (default: %u)"), DEFAULT_MAX_MEMPOOL_SIZE)); |
| 305 | strUsage += HelpMessageOpt("-mempoolexpiry=<n>", strprintf(_("Do not keep transactions in the mempool longer than <n> hours (default: %u)"), DEFAULT_MEMPOOL_EXPIRY)); |
| 306 | 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)"), |
| 307 | -GetNumCores(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS)); |
| 308 | #ifndef WIN32 |
| 309 | strUsage += HelpMessageOpt("-pid=<file>", strprintf(_("Specify pid file (default: %s)"), "bitcoind.pid")); |
| 310 | #endif |
| 311 | strUsage += HelpMessageOpt("-prune=<n>", strprintf(_("Reduce storage requirements by pruning (deleting) old blocks. This mode disables wallet support and is incompatible with -txindex. " |
| 312 | "Warning: Reverting this setting requires re-downloading the entire blockchain. " |
| 313 | "(default: 0 = disable pruning blocks, >%u = target size in MiB to use for block files)"), MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024)); |
| 314 | strUsage += HelpMessageOpt("-reindex-chainstate", _("Rebuild chain state from the currently indexed blocks")); |
| 315 | strUsage += HelpMessageOpt("-reindex", _("Rebuild chain state and block index from the blk*.dat files on disk")); |
| 316 | #if !defined(WIN32) |
| 317 | strUsage += HelpMessageOpt("-sysperms", _("Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)")); |
| 318 | #endif |
| 319 | strUsage += HelpMessageOpt("-txindex", strprintf(_("Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)"), 0)); |
| 320 | |
| 321 | strUsage += HelpMessageGroup(_("Connection options:")); |
| 322 | strUsage += HelpMessageOpt("-addnode=<ip>", _("Add a node to connect to and attempt to keep the connection open")); |
| 323 | strUsage += HelpMessageOpt("-banscore=<n>", strprintf(_("Threshold for disconnecting misbehaving peers (default: %u)"), 100)); |
| 324 | strUsage += HelpMessageOpt("-bantime=<n>", strprintf(_("Number of seconds to keep misbehaving peers from reconnecting (default: %u)"), 86400)); |
| 325 | strUsage += HelpMessageOpt("-bind=<addr>", _("Bind to given address and always listen on it. Use [host]:port notation for IPv6")); |
| 326 | strUsage += HelpMessageOpt("-connect=<ip>", _("Connect only to the specified node(s)")); |
| 327 | strUsage += HelpMessageOpt("-disableipprio", _("Disable connection prioritization by IP address group if node runs out of available connections")); |
| 328 | strUsage += HelpMessageOpt("-discover", _("Discover own IP addresses (default: 1 when listening and no -externalip or -proxy)")); |
| 329 | strUsage += HelpMessageOpt("-dns", _("Allow DNS lookups for -addnode, -seednode and -connect") + " " + _("(default: 1)")); |
| 330 | strUsage += HelpMessageOpt("-dnsseed", _("Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)")); |
| 331 | strUsage += HelpMessageOpt("-externalip=<ip>", _("Specify your own public address")); |
| 332 | strUsage += HelpMessageOpt("-forcednsseed", strprintf(_("Always query for peer addresses via DNS lookup (default: %u)"), 0)); |
| 333 | strUsage += HelpMessageOpt("-hide-platform", _("Don't show platform information in the client string")); |
| 334 | strUsage += HelpMessageOpt("-listen", _("Accept connections from outside (default: 1 if no -proxy or -connect)")); |
| 335 | strUsage += HelpMessageOpt("-maxconnections=<n>", strprintf(_("Maintain at most <n> connections to peers (default: %u)"), 125)); |
| 336 | strUsage += HelpMessageOpt("-maxreceivebuffer=<n>", strprintf(_("Maximum per-connection receive buffer, <n>*1000 bytes (default: %u)"), 5000)); |
| 337 | strUsage += HelpMessageOpt("-maxsendbuffer=<n>", strprintf(_("Maximum per-connection send buffer, <n>*1000 bytes (default: %u)"), 1000)); |
no test coverage detected