Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 888 Lines • ▼ Show 20 Lines | gArgs.AddArg("-excessutxocharge=<amt>", | ||||
"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); | 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); | false, OptionsCategory::BLOCK_CREATION); | ||||
gArgs.AddArg("-blockprioritypercentage=<n>", | |||||
strprintf("Set maximum percentage of a block reserved to " | |||||
"high-priority/low-fee transactions (default: %d)", | |||||
DEFAULT_BLOCK_PRIORITY_PERCENTAGE), | |||||
false, OptionsCategory::BLOCK_CREATION); | |||||
gArgs.AddArg("-blockmintxfee=<amt>", | 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)), | ||||
false, OptionsCategory::BLOCK_CREATION); | false, OptionsCategory::BLOCK_CREATION); | ||||
gArgs.AddArg("-blockversion=<n>", | gArgs.AddArg("-blockversion=<n>", | ||||
▲ Show 20 Lines • Show All 568 Lines • ▼ Show 20 Lines | bool AppInitParameterInteraction(Config &config) { | ||||
// if using block pruning, then disallow txindex | // if using block pruning, then disallow txindex | ||||
if (gArgs.GetArg("-prune", 0)) { | if (gArgs.GetArg("-prune", 0)) { | ||||
if (gArgs.GetBoolArg("-txindex", DEFAULT_TXINDEX)) { | if (gArgs.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 | |||||
const int64_t blkprio = gArgs.GetArg("-blockprioritypercentage", | |||||
DEFAULT_BLOCK_PRIORITY_PERCENTAGE); | |||||
if (!config.SetBlockPriorityPercentage(blkprio)) { | |||||
return InitError(_("Block priority percentage has to belong to the " | |||||
"[0..100] interval.")); | |||||
} | |||||
// -bind and -whitebind can't be set when not listening | // -bind and -whitebind can't be set when not listening | ||||
size_t nUserBind = | size_t nUserBind = | ||||
gArgs.GetArgs("-bind").size() + gArgs.GetArgs("-whitebind").size(); | gArgs.GetArgs("-bind").size() + gArgs.GetArgs("-whitebind").size(); | ||||
if (nUserBind != 0 && !gArgs.GetBoolArg("-listen", DEFAULT_LISTEN)) { | if (nUserBind != 0 && !gArgs.GetBoolArg("-listen", DEFAULT_LISTEN)) { | ||||
return InitError( | return InitError( | ||||
"Cannot set -bind or -whitebind together with -listen=0"); | "Cannot set -bind or -whitebind together with -listen=0"); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,000 Lines • Show Last 20 Lines |