Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 778 Lines • ▼ Show 20 Lines | strUsage += HelpMessageOpt( | ||||
"relay and mine (default: %u)"), | "relay and mine (default: %u)"), | ||||
MAX_OP_RETURN_RELAY)); | MAX_OP_RETURN_RELAY)); | ||||
strUsage += HelpMessageGroup(_("Block creation options:")); | strUsage += HelpMessageGroup(_("Block creation options:")); | ||||
strUsage += HelpMessageOpt( | strUsage += HelpMessageOpt( | ||||
"-blockmaxsize=<n>", | "-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 += | strUsage += HelpMessageOpt( | ||||
HelpMessageOpt("-blockprioritysize=<n>", | "-blockprioritypercentage=<n>", | ||||
strprintf(_("Set maximum size of high-priority/low-fee " | strprintf(_("Set maximum percentage of a block reserved to " | ||||
"transactions in bytes (default: %d)"), | "high-priority/low-fee transactions (default: %d)"), | ||||
DEFAULT_BLOCK_PRIORITY_SIZE)); | DEFAULT_BLOCK_PRIORITY_PERCENTAGE)); | ||||
strUsage += HelpMessageOpt( | strUsage += HelpMessageOpt( | ||||
"-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))); | CURRENCY_UNIT, FormatMoney(DEFAULT_BLOCK_MIN_TX_FEE))); | ||||
if (showDebug) | if (showDebug) | ||||
strUsage += | strUsage += | ||||
HelpMessageOpt("-blockversion=<n>", | HelpMessageOpt("-blockversion=<n>", | ||||
▲ Show 20 Lines • Show All 469 Lines • ▼ Show 20 Lines | bool AppInitParameterInteraction(Config &config) { | ||||
// also see: InitParameterInteraction() | // also see: InitParameterInteraction() | ||||
// if using block pruning, then disallow txindex | // if using block pruning, then disallow txindex | ||||
if (GetArg("-prune", 0)) { | if (GetArg("-prune", 0)) { | ||||
if (GetBoolArg("-txindex", DEFAULT_TXINDEX)) | if (GetBoolArg("-txindex", DEFAULT_TXINDEX)) | ||||
return InitError(_("Prune mode is incompatible with -txindex.")); | return InitError(_("Prune mode is incompatible with -txindex.")); | ||||
} | } | ||||
// if space reserved for high priority transactions is misconfigured | |||||
// stop program execution and warn the user with a proper error message | |||||
int16_t blkprio = | |||||
GetArg("-blockprioritypercentage", DEFAULT_BLOCK_PRIORITY_PERCENTAGE); | |||||
if ((blkprio < 0) || (blkprio > 100)) { | |||||
return InitError(_("Block priority percentage has to belong to the " | |||||
"[0..100] interval.")); | |||||
} | |||||
// Make sure enough file descriptors are available | // Make sure enough file descriptors are available | ||||
int nBind = std::max( | int nBind = std::max( | ||||
(mapMultiArgs.count("-bind") ? mapMultiArgs.at("-bind").size() : 0) + | (mapMultiArgs.count("-bind") ? mapMultiArgs.at("-bind").size() : 0) + | ||||
(mapMultiArgs.count("-whitebind") | (mapMultiArgs.count("-whitebind") | ||||
? mapMultiArgs.at("-whitebind").size() | ? mapMultiArgs.at("-whitebind").size() | ||||
: 0), | : 0), | ||||
size_t(1)); | size_t(1)); | ||||
nUserMaxConnections = | nUserMaxConnections = | ||||
▲ Show 20 Lines • Show All 885 Lines • Show Last 20 Lines |