Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||
static const bool DEFAULT_STOPAFTERBLOCKIMPORT = false; | static const bool DEFAULT_STOPAFTERBLOCKIMPORT = false; | ||||
std::unique_ptr<CConnman> g_connman; | std::unique_ptr<CConnman> g_connman; | ||||
std::unique_ptr<PeerLogicValidation> peerLogic; | std::unique_ptr<PeerLogicValidation> peerLogic; | ||||
#if !(ENABLE_WALLET) | #if !(ENABLE_WALLET) | ||||
class DummyWalletInit : public WalletInitInterface { | class DummyWalletInit : public WalletInitInterface { | ||||
public: | public: | ||||
std::string GetHelpString(bool showDebug) const override { | void AddWalletOptions() const override {} | ||||
return std::string{}; | |||||
} | |||||
bool ParameterInteraction() const override { return true; } | bool ParameterInteraction() const override { return true; } | ||||
void RegisterRPC(CRPCTable &) const override {} | void RegisterRPC(CRPCTable &) const override {} | ||||
bool Verify(const CChainParams &chainParams) const override { return true; } | bool Verify(const CChainParams &chainParams) const override { return true; } | ||||
bool Open(const CChainParams &chainParams) const override { | bool Open(const CChainParams &chainParams) const override { | ||||
LogPrintf("No wallet support compiled in!\n"); | LogPrintf("No wallet support compiled in!\n"); | ||||
return true; | return true; | ||||
} | } | ||||
void Start(CScheduler &scheduler) const override {} | void Start(CScheduler &scheduler) const override {} | ||||
▲ Show 20 Lines • Show All 221 Lines • ▼ Show 20 Lines | |||||
void OnRPCStopped() { | void OnRPCStopped() { | ||||
uiInterface.NotifyBlockTip.disconnect(&RPCNotifyBlockChange); | uiInterface.NotifyBlockTip.disconnect(&RPCNotifyBlockChange); | ||||
RPCNotifyBlockChange(false, nullptr); | RPCNotifyBlockChange(false, nullptr); | ||||
g_best_block_cv.notify_all(); | g_best_block_cv.notify_all(); | ||||
LogPrint(BCLog::RPC, "RPC stopped.\n"); | LogPrint(BCLog::RPC, "RPC stopped.\n"); | ||||
} | } | ||||
std::string HelpMessage(HelpMessageMode mode) { | void SetupServerArgs() { | ||||
const auto defaultBaseParams = | const auto defaultBaseParams = | ||||
CreateBaseChainParams(CBaseChainParams::MAIN); | CreateBaseChainParams(CBaseChainParams::MAIN); | ||||
const auto testnetBaseParams = | const auto testnetBaseParams = | ||||
CreateBaseChainParams(CBaseChainParams::TESTNET); | CreateBaseChainParams(CBaseChainParams::TESTNET); | ||||
const auto defaultChainParams = CreateChainParams(CBaseChainParams::MAIN); | const auto defaultChainParams = CreateChainParams(CBaseChainParams::MAIN); | ||||
const auto testnetChainParams = | const auto testnetChainParams = | ||||
CreateChainParams(CBaseChainParams::TESTNET); | CreateChainParams(CBaseChainParams::TESTNET); | ||||
const bool showDebug = gArgs.GetBoolArg("-help-debug", false); | |||||
// 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. | ||||
std::string strUsage = HelpMessageGroup(_("Options:")); | gArgs.AddArg("-?", _("Print this help message and exit"), false, | ||||
strUsage += HelpMessageOpt("-?", _("Print this help message and exit")); | OptionsCategory::OPTIONS); | ||||
strUsage += HelpMessageOpt("-version", _("Print version and exit")); | gArgs.AddArg("-version", _("Print version and exit"), false, | ||||
strUsage += HelpMessageOpt( | OptionsCategory::OPTIONS); | ||||
"-alertnotify=<cmd>", | gArgs.AddArg("-alertnotify=<cmd>", | ||||
_("Execute command when a relevant alert is received or we see a " | _("Execute command when a relevant alert is received or we " | ||||
"really long fork (%s in cmd is replaced by message)")); | "see a really long fork (%s in cmd is replaced by message)"), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::OPTIONS); | ||||
"-blocksdir=<dir>", | gArgs.AddArg("-blocksdir=<dir>", | ||||
_("Specify blocks directory (default: <datadir>/blocks)")); | _("Specify blocks directory (default: <datadir>/blocks)"), | ||||
strUsage += HelpMessageOpt("-blocknotify=<cmd>", | false, OptionsCategory::OPTIONS); | ||||
_("Execute command when the best block changes " | gArgs.AddArg("-blocknotify=<cmd>", | ||||
"(%s in cmd is replaced by block hash)")); | _("Execute command when the best block changes (%s in cmd is " | ||||
if (showDebug) { | "replaced by block hash)"), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | |||||
"-blocksonly", | "-blocksonly", | ||||
strprintf( | strprintf(_("Whether to operate in a blocks only mode (default: %d)"), | ||||
_("Whether to operate in a blocks only mode (default: %d)"), | DEFAULT_BLOCKSONLY), | ||||
DEFAULT_BLOCKSONLY)); | true, OptionsCategory::OPTIONS); | ||||
} | gArgs.AddArg( | ||||
strUsage += HelpMessageOpt( | |||||
"-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()), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::OPTIONS); | ||||
"-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), | gArgs.AddArg("-conf=<file>", | ||||
BITCOIN_CONF_FILENAME)); | strprintf(_("Specify configuration file (default: %s)"), | ||||
if (mode == HelpMessageMode::BITCOIND) { | BITCOIN_CONF_FILENAME), | ||||
#if HAVE_DECL_DAEMON | false, OptionsCategory::OPTIONS); | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg("-datadir=<dir>", _("Specify data directory"), false, | ||||
"-daemon", | OptionsCategory::OPTIONS); | ||||
_("Run in the background as a daemon and accept commands")); | gArgs.AddArg( | ||||
#endif | |||||
} | |||||
strUsage += HelpMessageOpt("-datadir=<dir>", _("Specify data directory")); | |||||
if (showDebug) { | |||||
strUsage += HelpMessageOpt( | |||||
"-dbbatchsize", | "-dbbatchsize", | ||||
strprintf( | strprintf("Maximum database write batch size in bytes (default: %u)", | ||||
"Maximum database write batch size in bytes (default: %u)", | nDefaultDbBatchSize), | ||||
nDefaultDbBatchSize)); | true, OptionsCategory::OPTIONS); | ||||
} | gArgs.AddArg( | ||||
strUsage += HelpMessageOpt( | |||||
"-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), | ||||
if (showDebug) { | false, OptionsCategory::OPTIONS); | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg("-feefilter", | ||||
"-feefilter", strprintf("Tell other nodes to filter invs to us by " | strprintf("Tell other nodes to filter invs to us by " | ||||
"our mempool min fee (default: %d)", | "our mempool min fee (default: %d)", | ||||
DEFAULT_FEEFILTER)); | DEFAULT_FEEFILTER), | ||||
} | true, OptionsCategory::OPTIONS); | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg("-finalizationdelay=<n>", | ||||
"-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), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | |||||
"-maxreorgdepth=<n>", | "-maxreorgdepth=<n>", | ||||
strprintf("Configure at what depth blocks are considered final " | strprintf("Configure at what depth blocks are considered final " | ||||
"(default: %d). Use -1 to disable.", | "(default: %d). Use -1 to disable.", | ||||
DEFAULT_MAX_REORG_DEPTH)); | DEFAULT_MAX_REORG_DEPTH), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::OPTIONS); | ||||
"-loadblock=<file>", | gArgs.AddArg("-loadblock=<file>", | ||||
_("Imports blocks from external blk000??.dat file on startup")); | _("Imports blocks from external blk000??.dat file on startup"), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | |||||
"-debuglogfile=<file>", | "-debuglogfile=<file>", | ||||
strprintf( | strprintf( | ||||
_("Specify location of debug log file: this can be an absolute " | _("Specify location of debug log file: this can be an absolute " | ||||
"path or a path relative to the data directory (default: %s)"), | "path or a path relative to the data directory (default: %s)"), | ||||
DEFAULT_DEBUGLOGFILE)); | DEFAULT_DEBUGLOGFILE), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::OPTIONS); | ||||
"-maxorphantx=<n>", strprintf(_("Keep at most <n> unconnectable " | gArgs.AddArg("-maxorphantx=<n>", | ||||
strprintf(_("Keep at most <n> unconnectable " | |||||
"transactions in memory (default: %u)"), | "transactions in memory (default: %u)"), | ||||
DEFAULT_MAX_ORPHAN_TRANSACTIONS)); | DEFAULT_MAX_ORPHAN_TRANSACTIONS), | ||||
strUsage += HelpMessageOpt("-maxmempool=<n>", | false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-maxmempool=<n>", | |||||
strprintf(_("Keep the transaction memory pool " | strprintf(_("Keep the transaction memory pool " | ||||
"below <n> megabytes (default: %u)"), | "below <n> megabytes (default: %u)"), | ||||
DEFAULT_MAX_MEMPOOL_SIZE)); | DEFAULT_MAX_MEMPOOL_SIZE), | ||||
strUsage += | false, OptionsCategory::OPTIONS); | ||||
HelpMessageOpt("-mempoolexpiry=<n>", | gArgs.AddArg("-mempoolexpiry=<n>", | ||||
strprintf(_("Do not keep transactions in the mempool " | strprintf(_("Do not keep transactions in the mempool " | ||||
"longer than <n> hours (default: %u)"), | "longer than <n> hours (default: %u)"), | ||||
DEFAULT_MEMPOOL_EXPIRY)); | DEFAULT_MEMPOOL_EXPIRY), | ||||
if (showDebug) { | false, OptionsCategory::OPTIONS); | ||||
strUsage += HelpMessageOpt( | 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); | ||||
strUsage += | gArgs.AddArg("-persistmempool", | ||||
HelpMessageOpt("-persistmempool", | |||||
strprintf(_("Whether to save the mempool on shutdown " | strprintf(_("Whether to save the mempool on shutdown " | ||||
"and load on restart (default: %u)"), | "and load on restart (default: %u)"), | ||||
DEFAULT_PERSIST_MEMPOOL)); | DEFAULT_PERSIST_MEMPOOL), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | |||||
"-blockreconstructionextratxn=<n>", | "-blockreconstructionextratxn=<n>", | ||||
strprintf(_("Extra transactions to keep in memory for compact block " | strprintf(_("Extra transactions to keep in memory for compact block " | ||||
"reconstructions (default: %u)"), | "reconstructions (default: %u)"), | ||||
DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN)); | DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | |||||
"-par=<n>", | "-par=<n>", | ||||
strprintf(_("Set the number of script verification threads (%u to %d, " | strprintf(_("Set the number of script verification threads (%u to %d, " | ||||
"0 = auto, <0 = leave that many cores free, default: %d)"), | "0 = 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); | |||||
#ifndef WIN32 | #ifndef WIN32 | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg( | ||||
"-pid=<file>", | "-pid=<file>", | ||||
strprintf(_("Specify pid file (default: %s)"), BITCOIN_PID_FILENAME)); | strprintf(_("Specify pid file (default: %s)"), BITCOIN_PID_FILENAME), | ||||
false, OptionsCategory::OPTIONS); | |||||
#endif | #endif | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg( | ||||
"-prune=<n>", | "-prune=<n>", | ||||
strprintf( | strprintf( | ||||
_("Reduce storage requirements by enabling pruning (deleting) of " | _("Reduce storage requirements by enabling pruning (deleting) of " | ||||
"old blocks. This allows the pruneblockchain RPC to be called to " | "old blocks. This allows the pruneblockchain RPC to be called to " | ||||
"delete specific blocks, and enables automatic pruning of old " | "delete specific blocks, and enables automatic pruning of old " | ||||
"blocks if a target size in MiB is provided. This mode is " | "blocks if a target size in MiB is provided. This mode is " | ||||
"incompatible with -txindex and -rescan. " | "incompatible with -txindex and -rescan. " | ||||
"Warning: Reverting this setting requires re-downloading the " | "Warning: Reverting this setting requires re-downloading the " | ||||
"entire blockchain. " | "entire blockchain. " | ||||
"(default: 0 = disable pruning blocks, 1 = allow manual pruning " | "(default: 0 = disable pruning blocks, 1 = allow manual pruning " | ||||
"via RPC, >%u = automatically prune block files to stay under " | "via RPC, >%u = automatically prune block files to stay under " | ||||
"the specified target size in MiB)"), | "the specified target size in MiB)"), | ||||
MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024)); | MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::OPTIONS); | ||||
"-reindex-chainstate", | gArgs.AddArg("-reindex-chainstate", | ||||
_("Rebuild chain state from the currently indexed blocks")); | _("Rebuild chain state from the currently indexed blocks"), | ||||
strUsage += | false, OptionsCategory::OPTIONS); | ||||
HelpMessageOpt("-reindex", _("Rebuild chain state and block index from " | gArgs.AddArg("-reindex", | ||||
"the blk*.dat files on disk")); | _("Rebuild chain state and block index from the blk*.dat " | ||||
"files on disk"), | |||||
false, OptionsCategory::OPTIONS); | |||||
#ifndef WIN32 | #ifndef WIN32 | ||||
strUsage += HelpMessageOpt( | 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); | |||||
#endif | #endif | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg("-txindex", | ||||
"-txindex", strprintf(_("Maintain a full transaction index, used by " | strprintf(_("Maintain a full transaction index, used by the " | ||||
"the getrawtransaction rpc call (default: %d)"), | "getrawtransaction rpc call (default: %d)"), | ||||
DEFAULT_TXINDEX)); | DEFAULT_TXINDEX), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::OPTIONS); | ||||
"-usecashaddr", _("Use Cash Address for destination encoding instead " | gArgs.AddArg("-usecashaddr", | ||||
"of base58 (activate by default on Jan, 14)")); | _("Use Cash Address for destination encoding instead " | ||||
"of base58 (activate by default on Jan, 14)"), | |||||
false, OptionsCategory::OPTIONS); | |||||
strUsage += HelpMessageGroup(_("Connection options:")); | gArgs.AddArg( | ||||
strUsage += HelpMessageOpt( | |||||
"-addnode=<ip>", | "-addnode=<ip>", | ||||
_("Add a node to connect to and attempt to keep the connection open " | _("Add a node to connect to and attempt to keep the connection open " | ||||
"(see the `addnode` RPC command help for more info)")); | "(see the `addnode` RPC command help for more info)"), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | |||||
"-banscore=<n>", | "-banscore=<n>", | ||||
strprintf( | strprintf( | ||||
_("Threshold for disconnecting misbehaving peers (default: %u)"), | _("Threshold for disconnecting misbehaving peers (default: %u)"), | ||||
DEFAULT_BANSCORE_THRESHOLD)); | DEFAULT_BANSCORE_THRESHOLD), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::CONNECTION); | ||||
"-bantime=<n>", strprintf(_("Number of seconds to keep misbehaving " | gArgs.AddArg("-bantime=<n>", | ||||
"peers from reconnecting (default: %u)"), | strprintf(_("Number of seconds to keep misbehaving peers from " | ||||
DEFAULT_MISBEHAVING_BANTIME)); | "reconnecting (default: %u)"), | ||||
strUsage += HelpMessageOpt("-bind=<addr>", | DEFAULT_MISBEHAVING_BANTIME), | ||||
_("Bind to given address and always listen on " | false, OptionsCategory::CONNECTION); | ||||
"it. Use [host]:port notation for IPv6")); | gArgs.AddArg("-bind=<addr>", | ||||
strUsage += HelpMessageOpt( | _("Bind to given address and always listen on it. Use " | ||||
"-connect=<ip>", _("Connect only to the specified node(s); -connect=0 " | "[host]:port notation for IPv6"), | ||||
"disables automatic connections (the rules for this " | false, OptionsCategory::CONNECTION); | ||||
"peer are the same as for -addnode)")); | gArgs.AddArg("-connect=<ip>", | ||||
strUsage += HelpMessageOpt("-discover", | _("Connect only to the specified node(s); -connect=0 disables " | ||||
_("Discover own IP addresses (default: 1 when " | "automatic connections (the rules for this peer are the " | ||||
"listening and no -externalip or -proxy)")); | "same as for -addnode)"), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::CONNECTION); | ||||
"-dns", _("Allow DNS lookups for -addnode, -seednode and -connect") + | gArgs.AddArg("-discover", | ||||
" " + strprintf(_("(default: %d)"), DEFAULT_NAME_LOOKUP)); | _("Discover own IP addresses (default: 1 when listening and " | ||||
strUsage += HelpMessageOpt( | "no -externalip or -proxy)"), | ||||
"-dnsseed", _("Query for peer addresses via DNS lookup, if low on " | false, OptionsCategory::CONNECTION); | ||||
"addresses (default: 1 unless -connect/-noconnect)")); | gArgs.AddArg("-dns", | ||||
strUsage += HelpMessageOpt("-externalip=<ip>", | _("Allow DNS lookups for -addnode, -seednode and -connect") + | ||||
_("Specify your own public address")); | " " + strprintf(_("(default: %d)"), DEFAULT_NAME_LOOKUP), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-dnsseed", | |||||
_("Query for peer addresses via DNS lookup, if low on " | |||||
"addresses (default: 1 unless -connect/-noconnect)"), | |||||
false, OptionsCategory::CONNECTION); | |||||
gArgs.AddArg("-externalip=<ip>", _("Specify your own public address"), | |||||
false, OptionsCategory::CONNECTION); | |||||
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), | ||||
strUsage += | false, OptionsCategory::CONNECTION); | ||||
HelpMessageOpt("-listen", _("Accept connections from outside (default: " | gArgs.AddArg("-listen", | ||||
"1 if no -proxy or -connect/-noconnect)")); | _("Accept connections from outside (default: 1 if no -proxy " | ||||
strUsage += HelpMessageOpt( | "or -connect/-noconnect)"), | ||||
false, OptionsCategory::CONNECTION); | |||||
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), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::CONNECTION); | ||||
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), | ||||
strUsage += | false, OptionsCategory::CONNECTION); | ||||
HelpMessageOpt("-maxreceivebuffer=<n>", | gArgs.AddArg("-maxreceivebuffer=<n>", | ||||
strprintf(_("Maximum per-connection receive buffer, " | strprintf(_("Maximum per-connection receive buffer, <n>*1000 " | ||||
"<n>*1000 bytes (default: %u)"), | "bytes (default: %u)"), | ||||
DEFAULT_MAXRECEIVEBUFFER)); | DEFAULT_MAXRECEIVEBUFFER), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::CONNECTION); | ||||
"-maxsendbuffer=<n>", strprintf(_("Maximum per-connection send buffer, " | gArgs.AddArg("-maxsendbuffer=<n>", | ||||
"<n>*1000 bytes (default: %u)"), | strprintf(_("Maximum per-connection send buffer, <n>*1000 " | ||||
DEFAULT_MAXSENDBUFFER)); | "bytes (default: %u)"), | ||||
strUsage += HelpMessageOpt( | DEFAULT_MAXSENDBUFFER), | ||||
false, OptionsCategory::CONNECTION); | |||||
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), | ||||
strUsage += | false, OptionsCategory::CONNECTION); | ||||
HelpMessageOpt("-onion=<ip:port>", | gArgs.AddArg("-onion=<ip:port>", | ||||
strprintf(_("Use separate SOCKS5 proxy to reach peers " | strprintf(_("Use separate SOCKS5 proxy to reach peers via Tor " | ||||
"via Tor hidden services (default: %s)"), | "hidden services (default: %s)"), | ||||
"-proxy")); | "-proxy"), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | |||||
"-onlynet=<net>", | "-onlynet=<net>", | ||||
_("Only connect to nodes in network <net> (ipv4, ipv6 or onion)")); | _("Only connect to nodes in network <net> (ipv4, ipv6 or onion)"), | ||||
strUsage += | false, OptionsCategory::CONNECTION); | ||||
HelpMessageOpt("-permitbaremultisig", | gArgs.AddArg("-permitbaremultisig", | ||||
strprintf(_("Relay non-P2SH multisig (default: %d)"), | strprintf(_("Relay non-P2SH multisig (default: %d)"), | ||||
DEFAULT_PERMIT_BAREMULTISIG)); | DEFAULT_PERMIT_BAREMULTISIG), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::CONNECTION); | ||||
"-peerbloomfilters", | gArgs.AddArg("-peerbloomfilters", | ||||
strprintf(_("Support filtering of blocks and transaction with bloom " | strprintf(_("Support filtering of blocks and transaction with " | ||||
"filters (default: %d)"), | "bloom filters (default: %d)"), | ||||
DEFAULT_PEERBLOOMFILTERS)); | DEFAULT_PEERBLOOMFILTERS), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | |||||
"-port=<port>", | "-port=<port>", | ||||
strprintf( | strprintf( | ||||
_("Listen for connections on <port> (default: %u or testnet: %u)"), | _("Listen for connections on <port> (default: %u or testnet: %u)"), | ||||
defaultChainParams->GetDefaultPort(), | defaultChainParams->GetDefaultPort(), | ||||
testnetChainParams->GetDefaultPort())); | testnetChainParams->GetDefaultPort()), | ||||
strUsage += | false, OptionsCategory::CONNECTION); | ||||
HelpMessageOpt("-proxy=<ip:port>", _("Connect through SOCKS5 proxy")); | gArgs.AddArg("-proxy=<ip:port>", _("Connect through SOCKS5 proxy"), false, | ||||
strUsage += HelpMessageOpt( | OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | |||||
"-proxyrandomize", | "-proxyrandomize", | ||||
strprintf(_("Randomize credentials for every proxy connection. This " | strprintf(_("Randomize credentials for every proxy connection. This " | ||||
"enables Tor stream isolation (default: %d)"), | "enables Tor stream isolation (default: %d)"), | ||||
DEFAULT_PROXYRANDOMIZE)); | DEFAULT_PROXYRANDOMIZE), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | |||||
"-seednode=<ip>", | "-seednode=<ip>", | ||||
_("Connect to a node to retrieve peer addresses, and disconnect")); | _("Connect to a node to retrieve peer addresses, and disconnect"), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::CONNECTION); | ||||
"-timeout=<n>", strprintf(_("Specify connection timeout in " | gArgs.AddArg("-timeout=<n>", | ||||
"milliseconds (minimum: 1, default: %d)"), | strprintf(_("Specify connection timeout in milliseconds " | ||||
DEFAULT_CONNECT_TIMEOUT)); | "(minimum: 1, default: %d)"), | ||||
strUsage += HelpMessageOpt("-torcontrol=<ip>:<port>", | DEFAULT_CONNECT_TIMEOUT), | ||||
strprintf(_("Tor control port to use if onion " | false, OptionsCategory::CONNECTION); | ||||
"listening enabled (default: %s)"), | gArgs.AddArg("-torcontrol=<ip>:<port>", | ||||
DEFAULT_TOR_CONTROL)); | strprintf(_("Tor control port to use if onion listening " | ||||
strUsage += HelpMessageOpt("-torpassword=<pass>", | "enabled (default: %s)"), | ||||
_("Tor control port password (default: empty)")); | DEFAULT_TOR_CONTROL), | ||||
false, OptionsCategory::CONNECTION); | |||||
gArgs.AddArg("-torpassword=<pass>", | |||||
_("Tor control port password (default: empty)"), false, | |||||
OptionsCategory::CONNECTION); | |||||
#ifdef USE_UPNP | #ifdef USE_UPNP | ||||
#if USE_UPNP | #if USE_UPNP | ||||
strUsage += | gArgs.AddArg("-upnp", | ||||
HelpMessageOpt("-upnp", _("Use UPnP to map the listening port " | _("Use UPnP to map the listening port (default: 1 when " | ||||
"(default: 1 when listening and no -proxy)")); | "listening and no -proxy)"), | ||||
false, OptionsCategory::CONNECTION); | |||||
#else | #else | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg( | ||||
"-upnp", | "-upnp", | ||||
strprintf(_("Use UPnP to map the listening port (default: %u)"), 0)); | strprintf(_("Use UPnP to map the listening port (default: %u)"), 0), | ||||
false, OptionsCategory::CONNECTION); | |||||
#endif | #endif | ||||
#endif | #endif | ||||
strUsage += | gArgs.AddArg("-whitebind=<addr>", | ||||
HelpMessageOpt("-whitebind=<addr>", | _("Bind to given address and whitelist peers connecting to " | ||||
_("Bind to given address and whitelist peers connecting " | "it. Use [host]:port notation for IPv6"), | ||||
"to it. Use [host]:port notation for IPv6")); | false, OptionsCategory::CONNECTION); | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg("-whitelist=<IP address or network>", | ||||
"-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) " | "1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be " | ||||
"or CIDR notated network (e.g. 1.2.3.0/24). Can be specified " | "specified multiple times.") + | ||||
"multiple times.") + | |||||
" " + | " " + | ||||
_("Whitelisted peers cannot be DoS banned and their transactions " | _("Whitelisted peers cannot be DoS banned and their " | ||||
"are always relayed, even if they are already in the mempool, " | "transactions are always relayed, even if they are " | ||||
"useful e.g. for a gateway")); | "already in the mempool, useful e.g. for a gateway"), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::CONNECTION); | ||||
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), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | |||||
"-whitelistforcerelay", | "-whitelistforcerelay", | ||||
strprintf(_("Force relay of transactions from whitelisted peers even " | strprintf(_("Force relay of transactions from whitelisted peers even " | ||||
"if they violate local relay policy (default: %d)"), | "if they violate local relay policy (default: %d)"), | ||||
DEFAULT_WHITELISTFORCERELAY)); | DEFAULT_WHITELISTFORCERELAY), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::CONNECTION); | ||||
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); | |||||
strUsage += g_wallet_init_interface.GetHelpString(showDebug); | g_wallet_init_interface.AddWalletOptions(); | ||||
#if ENABLE_ZMQ | #if ENABLE_ZMQ | ||||
strUsage += HelpMessageGroup(_("ZeroMQ notification options:")); | gArgs.AddArg("-zmqpubhashblock=<address>", | ||||
strUsage += HelpMessageOpt("-zmqpubhashblock=<address>", | _("Enable publish hash block in <address>"), false, | ||||
_("Enable publish hash block in <address>")); | OptionsCategory::ZMQ); | ||||
strUsage += | gArgs.AddArg("-zmqpubhashtx=<address>", | ||||
HelpMessageOpt("-zmqpubhashtx=<address>", | _("Enable publish hash transaction in <address>"), false, | ||||
_("Enable publish hash transaction in <address>")); | OptionsCategory::ZMQ); | ||||
strUsage += HelpMessageOpt("-zmqpubrawblock=<address>", | gArgs.AddArg("-zmqpubrawblock=<address>", | ||||
_("Enable publish raw block in <address>")); | _("Enable publish raw block in <address>"), false, | ||||
strUsage += | OptionsCategory::ZMQ); | ||||
HelpMessageOpt("-zmqpubrawtx=<address>", | gArgs.AddArg("-zmqpubrawtx=<address>", | ||||
_("Enable publish raw transaction in <address>")); | _("Enable publish raw transaction in <address>"), false, | ||||
#endif | OptionsCategory::ZMQ); | ||||
#endif | |||||
strUsage += HelpMessageGroup(_("Debugging/Testing options:")); | |||||
strUsage += HelpMessageOpt("-uacomment=<cmt>", | gArgs.AddArg( | ||||
_("Append comment to the user agent string")); | |||||
if (showDebug) { | |||||
strUsage += HelpMessageOpt( | |||||
"-checkblocks=<n>", | "-checkblocks=<n>", | ||||
strprintf( | strprintf( | ||||
_("How many blocks to check at startup (default: %u, 0 = all)"), | _("How many blocks to check at startup (default: %u, 0 = all)"), | ||||
DEFAULT_CHECKBLOCKS)); | DEFAULT_CHECKBLOCKS), | ||||
strUsage += | true, OptionsCategory::DEBUG_TEST); | ||||
HelpMessageOpt("-checklevel=<n>", | gArgs.AddArg("-checklevel=<n>", | ||||
strprintf(_("How thorough the block verification of " | strprintf(_("How thorough the block verification of " | ||||
"-checkblocks is (0-4, default: %u)"), | "-checkblocks is (0-4, default: %u)"), | ||||
DEFAULT_CHECKLEVEL)); | DEFAULT_CHECKLEVEL), | ||||
strUsage += HelpMessageOpt( | true, OptionsCategory::DEBUG_TEST); | ||||
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 " | ||||
"mapBlocksUnlinked occasionally. Also sets -checkmempool " | "occasionally. Also sets -checkmempool (default: %u)", | ||||
"(default: %u)", | defaultChainParams->DefaultConsistencyChecks()), | ||||
defaultChainParams->DefaultConsistencyChecks())); | true, OptionsCategory::DEBUG_TEST); | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg("-checkmempool=<n>", | ||||
"-checkmempool=<n>", | |||||
strprintf("Run checks every <n> transactions (default: %u)", | strprintf("Run checks every <n> transactions (default: %u)", | ||||
defaultChainParams->DefaultConsistencyChecks())); | defaultChainParams->DefaultConsistencyChecks()), | ||||
strUsage += HelpMessageOpt( | true, OptionsCategory::DEBUG_TEST); | ||||
"-checkpoints", strprintf("Only accept block chain matching " | gArgs.AddArg("-checkpoints", | ||||
"built-in checkpoints (default: %d)", | strprintf("Only accept block chain matching built-in " | ||||
DEFAULT_CHECKPOINTS_ENABLED)); | "checkpoints (default: %d)", | ||||
strUsage += | DEFAULT_CHECKPOINTS_ENABLED), | ||||
HelpMessageOpt("-deprecatedrpc=<method>", | true, OptionsCategory::DEBUG_TEST); | ||||
"Allows deprecated RPC method(s) to be used"); | gArgs.AddArg("-deprecatedrpc=<method>", | ||||
strUsage += | "Allows deprecated RPC method(s) to be used", true, | ||||
HelpMessageOpt("-dropmessagestest=<n>", | OptionsCategory::DEBUG_TEST); | ||||
"Randomly drop 1 of every <n> network messages"); | gArgs.AddArg("-dropmessagestest=<n>", | ||||
strUsage += HelpMessageOpt( | "Randomly drop 1 of every <n> network messages", true, | ||||
OptionsCategory::DEBUG_TEST); | |||||
gArgs.AddArg( | |||||
"-stopafterblockimport", | "-stopafterblockimport", | ||||
strprintf( | strprintf("Stop running after importing blocks from disk (default: %d)", | ||||
"Stop running after importing blocks from disk (default: %d)", | DEFAULT_STOPAFTERBLOCKIMPORT), | ||||
DEFAULT_STOPAFTERBLOCKIMPORT)); | true, OptionsCategory::DEBUG_TEST); | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg("-stopatheight", | ||||
"-stopatheight", strprintf("Stop running after reaching the given " | strprintf("Stop running after reaching the given height in " | ||||
"height in the main chain (default: %u)", | "the main chain (default: %u)", | ||||
DEFAULT_STOPATHEIGHT)); | DEFAULT_STOPATHEIGHT), | ||||
strUsage += HelpMessageOpt( | true, OptionsCategory::DEBUG_TEST); | ||||
"-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 (default: %u)", | "ancestors is <n> or more (default: %u)", | ||||
DEFAULT_ANCESTOR_LIMIT)); | DEFAULT_ANCESTOR_LIMIT), | ||||
strUsage += | true, OptionsCategory::DEBUG_TEST); | ||||
HelpMessageOpt("-limitancestorsize=<n>", | gArgs.AddArg( | ||||
strprintf("Do not accept transactions whose size " | "-limitancestorsize=<n>", | ||||
"with all in-mempool ancestors exceeds " | strprintf("Do not accept transactions whose size with all in-mempool " | ||||
"<n> kilobytes (default: %u)", | "ancestors exceeds <n> kilobytes (default: %u)", | ||||
DEFAULT_ANCESTOR_SIZE_LIMIT)); | DEFAULT_ANCESTOR_SIZE_LIMIT), | ||||
strUsage += HelpMessageOpt( | true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | |||||
"-limitdescendantcount=<n>", | "-limitdescendantcount=<n>", | ||||
strprintf("Do not accept transactions if any ancestor would have " | strprintf("Do not accept transactions if any ancestor would have <n> " | ||||
"<n> or more in-mempool descendants (default: %u)", | "or more in-mempool descendants (default: %u)", | ||||
DEFAULT_DESCENDANT_LIMIT)); | DEFAULT_DESCENDANT_LIMIT), | ||||
strUsage += HelpMessageOpt( | true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | |||||
"-limitdescendantsize=<n>", | "-limitdescendantsize=<n>", | ||||
strprintf("Do not accept transactions if any ancestor would have " | strprintf("Do not accept transactions if any ancestor would have more " | ||||
"more than <n> kilobytes of in-mempool descendants " | "than <n> kilobytes of in-mempool descendants (default: %u).", | ||||
"(default: %u).", | DEFAULT_DESCENDANT_SIZE_LIMIT), | ||||
DEFAULT_DESCENDANT_SIZE_LIMIT)); | true, OptionsCategory::DEBUG_TEST); | ||||
strUsage += HelpMessageOpt("-addrmantest", | gArgs.AddArg("-addrmantest", "Allows to test address relay on localhost", | ||||
"Allows to test address relay on localhost"); | true, OptionsCategory::DEBUG_TEST); | ||||
} | |||||
strUsage += HelpMessageOpt( | gArgs.AddArg("-debug=<category>", | ||||
"-debug=<category>", | strprintf(_("Output debugging information (default: %u, " | ||||
strprintf(_("Output debugging information (default: %u, supplying " | "supplying <category> is optional)"), | ||||
"<category> is optional)"), | |||||
0) + | 0) + | ||||
". " + | ". " + | ||||
_("If <category> is not supplied or if <category> = 1, output all " | _("If <category> is not supplied or if <category> = 1, " | ||||
"debugging information.") + | "output all debugging information.") + | ||||
_("<category> can be:") + " " + ListLogCategories() + "."); | _("<category> can be:") + " " + ListLogCategories() + ".", | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::DEBUG_TEST); | ||||
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.")), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::DEBUG_TEST); | ||||
"-help-debug", | gArgs.AddArg("-help-debug", | ||||
_("Show all debugging options (usage: --help -help-debug)")); | _("Show all debugging options (usage: --help -help-debug)"), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | |||||
"-logips", | "-logips", | ||||
strprintf(_("Include IP addresses in debug output (default: %d)"), | strprintf(_("Include IP addresses in debug output (default: %d)"), | ||||
DEFAULT_LOGIPS)); | DEFAULT_LOGIPS), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | |||||
"-logtimestamps", | "-logtimestamps", | ||||
strprintf(_("Prepend debug output with timestamp (default: %d)"), | strprintf(_("Prepend debug output with timestamp (default: %d)"), | ||||
DEFAULT_LOGTIMESTAMPS)); | DEFAULT_LOGTIMESTAMPS), | ||||
if (showDebug) { | false, OptionsCategory::DEBUG_TEST); | ||||
strUsage += HelpMessageOpt( | |||||
gArgs.AddArg( | |||||
"-logtimemicros", | "-logtimemicros", | ||||
strprintf( | strprintf("Add microsecond precision to debug timestamps (default: %d)", | ||||
"Add microsecond precision to debug timestamps (default: %d)", | DEFAULT_LOGTIMEMICROS), | ||||
DEFAULT_LOGTIMEMICROS)); | true, OptionsCategory::DEBUG_TEST); | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg( | ||||
"-mocktime=<n>", | "-mocktime=<n>", | ||||
"Replace actual time with <n> seconds since epoch (default: 0)"); | "Replace actual time with <n> seconds since epoch (default: 0)", true, | ||||
strUsage += HelpMessageOpt( | OptionsCategory::DEBUG_TEST); | ||||
"-limitfreerelay=<n>", | gArgs.AddArg( | ||||
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: %d)", | |||||
DEFAULT_RELAYPRIORITY)); | |||||
strUsage += HelpMessageOpt( | |||||
"-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), | ||||
strUsage += HelpMessageOpt( | true, OptionsCategory::DEBUG_TEST); | ||||
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), | ||||
strUsage += HelpMessageOpt( | true, OptionsCategory::DEBUG_TEST); | ||||
"-maxtipage=<n>", | gArgs.AddArg("-maxtipage=<n>", | ||||
strprintf("Maximum tip age in seconds to consider node in initial " | strprintf("Maximum tip age in seconds to consider node in " | ||||
"block download (default: %u)", | "initial block download (default: %u)", | ||||
DEFAULT_MAX_TIP_AGE)); | DEFAULT_MAX_TIP_AGE), | ||||
} | true, OptionsCategory::DEBUG_TEST); | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg( | ||||
"-excessutxocharge=<amt>", | |||||
strprintf(_("Fees (in %s/kB) to charge per utxo created for" | |||||
"relaying, and mining (default: %s)"), | |||||
CURRENCY_UNIT, FormatMoney(DEFAULT_UTXO_FEE))); | |||||
strUsage += HelpMessageOpt( | |||||
"-minrelaytxfee=<amt>", | |||||
strprintf( | |||||
_("Fees (in %s/kB) smaller than this are considered zero fee for " | |||||
"relaying, mining and transaction creation (default: %s)"), | |||||
CURRENCY_UNIT, FormatMoney(DEFAULT_MIN_RELAY_TX_FEE_PER_KB))); | |||||
strUsage += HelpMessageOpt( | |||||
"-maxtxfee=<amt>", | "-maxtxfee=<amt>", | ||||
strprintf(_("Maximum total fees (in %s) to use in a single wallet " | strprintf(_("Maximum total fees (in %s) to use in a single wallet " | ||||
"transaction or raw transaction; setting this too low may " | "transaction or raw transaction; setting this too low may " | ||||
"abort large transactions (default: %s)"), | "abort large transactions (default: %s)"), | ||||
CURRENCY_UNIT, FormatMoney(DEFAULT_TRANSACTION_MAXFEE))); | CURRENCY_UNIT, FormatMoney(DEFAULT_TRANSACTION_MAXFEE)), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | |||||
"-printtoconsole", | "-printtoconsole", | ||||
_("Send trace/debug info to console instead of debug.log file")); | _("Send trace/debug info to console instead of debug.log file"), false, | ||||
if (showDebug) { | OptionsCategory::DEBUG_TEST); | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg("-printpriority", | ||||
"-printpriority", strprintf("Log transaction priority and fee per " | strprintf("Log transaction priority and fee per kB when " | ||||
"kB when mining blocks (default: %d)", | "mining blocks (default: %d)", | ||||
DEFAULT_PRINTPRIORITY)); | DEFAULT_PRINTPRIORITY), | ||||
} | true, OptionsCategory::DEBUG_TEST); | ||||
strUsage += HelpMessageOpt("-shrinkdebugfile", | gArgs.AddArg("-shrinkdebugfile", | ||||
_("Shrink debug.log file on client startup " | _("Shrink debug.log file on client startup (default: 1 when " | ||||
"(default: 1 when no -debug)")); | "no -debug)"), | ||||
false, OptionsCategory::DEBUG_TEST); | |||||
AppendParamsHelpMessages(strUsage, showDebug); | |||||
gArgs.AddArg("-uacomment=<cmt>", | |||||
strUsage += HelpMessageGroup(_("Node relay options:")); | _("Append comment to the user agent string"), false, | ||||
if (showDebug) { | OptionsCategory::DEBUG_TEST); | ||||
strUsage += HelpMessageOpt( | |||||
SetupChainParamsBaseOptions(); | |||||
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; ", | "testnet/regtest only; ", defaultChainParams->RequireStandard()), | ||||
defaultChainParams->RequireStandard())); | true, OptionsCategory::NODE_RELAY); | ||||
strUsage += | gArgs.AddArg("-excessiveblocksize=<n>", | ||||
HelpMessageOpt("-excessiveblocksize=<n>", | strprintf(_("Do not accept blocks larger than this limit, in " | ||||
strprintf(_("Do not accept blocks larger than this " | "bytes (default: %d)"), | ||||
"limit, in bytes (default: %d)"), | DEFAULT_MAX_BLOCK_SIZE), | ||||
DEFAULT_MAX_BLOCK_SIZE)); | true, OptionsCategory::NODE_RELAY); | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg( | ||||
"-dustrelayfee=<amt>", | "-dustrelayfee=<amt>", | ||||
strprintf("Fee rate (in %s/kB) used to defined dust, the value of " | strprintf("Fee rate (in %s/kB) used to defined dust, the value of an " | ||||
"an output such that it will cost about 1/3 of its value " | "output such that it will cost about 1/3 of its value in " | ||||
"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); | ||||
strUsage += | gArgs.AddArg("-limitfreerelay=<n>", | ||||
HelpMessageOpt("-bytespersigop", | strprintf("Continuously rate-limit free transactions to " | ||||
strprintf(_("Equivalent bytes per sigop in transactions " | "<n>*1000 bytes per minute (default: %u)", | ||||
"for relay and mining (default: %u)"), | DEFAULT_LIMITFREERELAY), | ||||
DEFAULT_BYTES_PER_SIGOP)); | true, OptionsCategory::NODE_RELAY); | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg("-relaypriority", | ||||
strprintf("Require high priority for relaying free or low-fee " | |||||
"transactions (default: %d)", | |||||
DEFAULT_RELAYPRIORITY), | |||||
true, OptionsCategory::NODE_RELAY); | |||||
gArgs.AddArg("-bytespersigop", | |||||
strprintf(_("Equivalent bytes per sigop in transactions for " | |||||
"relay and mining (default: %u)"), | |||||
DEFAULT_BYTES_PER_SIGOP), | |||||
false, OptionsCategory::NODE_RELAY); | |||||
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), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::NODE_RELAY); | ||||
"-datacarriersize", | gArgs.AddArg("-datacarriersize", | ||||
strprintf(_("Maximum size of data in data carrier transactions we " | strprintf(_("Maximum size of data in data carrier " | ||||
"relay and mine (default: %u)"), | "transactions we relay and mine (default: %u)"), | ||||
MAX_OP_RETURN_RELAY)); | MAX_OP_RETURN_RELAY), | ||||
false, OptionsCategory::NODE_RELAY); | |||||
strUsage += HelpMessageGroup(_("Block creation options:")); | gArgs.AddArg( | ||||
strUsage += HelpMessageOpt( | "-minrelaytxfee=<amt>", | ||||
"-blockmaxsize=<n>", | strprintf( | ||||
_("Fees (in %s/kB) smaller than this are considered zero fee for " | |||||
"relaying, mining and transaction creation (default: %s)"), | |||||
CURRENCY_UNIT, FormatMoney(DEFAULT_MIN_RELAY_TX_FEE_PER_KB)), | |||||
false, OptionsCategory::NODE_RELAY); | |||||
// Not sure this really belongs here, but it will do for now. | |||||
// FIXME: This doesn't work anyways. | |||||
gArgs.AddArg("-excessutxocharge=<amt>", | |||||
strprintf(_("Fees (in %s/kB) to charge per utxo created for " | |||||
"relaying, and mining (default: %s)"), | |||||
CURRENCY_UNIT, FormatMoney(DEFAULT_UTXO_FEE)), | |||||
true, OptionsCategory::NODE_RELAY); | |||||
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), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::BLOCK_CREATION); | ||||
gArgs.AddArg( | |||||
"-blockprioritypercentage=<n>", | "-blockprioritypercentage=<n>", | ||||
strprintf(_("Set maximum percentage of a block reserved to " | strprintf(_("Set maximum percentage of a block reserved to " | ||||
"high-priority/low-fee transactions (default: %d)"), | "high-priority/low-fee transactions (default: %d)"), | ||||
DEFAULT_BLOCK_PRIORITY_PERCENTAGE)); | DEFAULT_BLOCK_PRIORITY_PERCENTAGE), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::BLOCK_CREATION); | ||||
gArgs.AddArg( | |||||
"-blockmintxfee=<amt>", | "-blockmintxfee=<amt>", | ||||
strprintf(_("Set lowest fee rate (in %s/kB) for transactions to be " | strprintf(_("Set lowest fee rate (in %s/kB) for transactions to be " | ||||
"included in block creation. (default: %s)"), | "included in block creation. (default: %s)"), | ||||
CURRENCY_UNIT, FormatMoney(DEFAULT_BLOCK_MIN_TX_FEE_PER_KB))); | CURRENCY_UNIT, FormatMoney(DEFAULT_BLOCK_MIN_TX_FEE_PER_KB)), | ||||
if (showDebug) { | false, OptionsCategory::BLOCK_CREATION); | ||||
strUsage += | |||||
HelpMessageOpt("-blockversion=<n>", | |||||
"Override block version to test forking scenarios"); | |||||
} | |||||
strUsage += HelpMessageGroup(_("RPC server options:")); | gArgs.AddArg("-blockversion=<n>", | ||||
strUsage += HelpMessageOpt("-server", | "Override block version to test forking scenarios", true, | ||||
_("Accept command line and JSON-RPC commands")); | OptionsCategory::BLOCK_CREATION); | ||||
strUsage += HelpMessageOpt( | |||||
"-rest", strprintf(_("Accept public REST requests (default: %d)"), | gArgs.AddArg("-server", _("Accept command line and JSON-RPC commands"), | ||||
DEFAULT_REST_ENABLE)); | false, OptionsCategory::RPC); | ||||
strUsage += HelpMessageOpt( | gArgs.AddArg("-rest", | ||||
strprintf(_("Accept public REST requests (default: %d)"), | |||||
DEFAULT_REST_ENABLE), | |||||
false, OptionsCategory::RPC); | |||||
gArgs.AddArg( | |||||
"-rpcbind=<addr>", | "-rpcbind=<addr>", | ||||
_("Bind to given address to listen for JSON-RPC connections. Use " | _("Bind to given address to listen for JSON-RPC connections. Use " | ||||
"[host]:port notation for IPv6. This option can be specified " | "[host]:port notation for IPv6. This option can be specified " | ||||
"multiple times (default: bind to all interfaces)")); | "multiple times (default: bind to all interfaces)"), | ||||
strUsage += | false, OptionsCategory::RPC); | ||||
HelpMessageOpt("-rpccookiefile=<loc>", | gArgs.AddArg("-rpccookiefile=<loc>", | ||||
_("Location of the auth cookie (default: data dir)")); | _("Location of the auth cookie (default: data dir)"), false, | ||||
strUsage += HelpMessageOpt("-rpcuser=<user>", | OptionsCategory::RPC); | ||||
_("Username for JSON-RPC connections")); | gArgs.AddArg("-rpcuser=<user>", _("Username for JSON-RPC connections"), | ||||
strUsage += HelpMessageOpt("-rpcpassword=<pw>", | false, OptionsCategory::RPC); | ||||
_("Password for JSON-RPC connections")); | gArgs.AddArg("-rpcpassword=<pw>", _("Password for JSON-RPC connections"), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::RPC); | ||||
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/rpcuser. The client then " | "python script is included in share/rpcuser. The client then " | ||||
"connects normally using the " | "connects normally using the " | ||||
"rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of arguments. This " | "rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of arguments. This " | ||||
"option can be specified multiple times")); | "option can be specified multiple times"), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::RPC); | ||||
gArgs.AddArg( | |||||
"-rpcport=<port>", | "-rpcport=<port>", | ||||
strprintf(_("Listen for JSON-RPC connections on <port> (default: %u or " | strprintf(_("Listen for JSON-RPC connections on <port> (default: %u or " | ||||
"testnet: %u)"), | "testnet: %u)"), | ||||
defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort())); | defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort()), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::RPC); | ||||
"-rpcallowip=<ip>", | gArgs.AddArg("-rpcallowip=<ip>", | ||||
_("Allow JSON-RPC connections from specified source. Valid for <ip> " | _("Allow JSON-RPC connections from specified source. Valid " | ||||
"are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. " | "for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask " | ||||
"1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This " | "(e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. " | ||||
"option can be specified multiple times")); | "1.2.3.4/24). This option can be specified multiple times"), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::RPC); | ||||
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), | ||||
strUsage += HelpMessageOpt( | false, OptionsCategory::RPC); | ||||
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)", | ||||
if (showDebug) { | false, OptionsCategory::RPC); | ||||
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)); | |||||
} | |||||
return strUsage; | gArgs.AddArg("-rpcworkqueue=<n>", | ||||
strprintf("Set the depth of the work queue to service RPC " | |||||
"calls (default: %d)", | |||||
DEFAULT_HTTP_WORKQUEUE), | |||||
true, OptionsCategory::RPC); | |||||
gArgs.AddArg("-rpcservertimeout=<n>", | |||||
strprintf("Timeout during HTTP requests (default: %d)", | |||||
DEFAULT_HTTP_SERVER_TIMEOUT), | |||||
true, OptionsCategory::RPC); | |||||
} | } | ||||
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>"; | ||||
const std::string URL_WEBSITE = "<https://www.bitcoinabc.org>"; | const std::string URL_WEBSITE = "<https://www.bitcoinabc.org>"; | ||||
return CopyrightHolders( | return CopyrightHolders( | ||||
▲ Show 20 Lines • Show All 1,475 Lines • Show Last 20 Lines |