Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 756 Lines • ▼ Show 20 Lines | strUsage += HelpMessageOpt( | ||||
strprintf(_("Fees (in %s/kB) to charge per utxo created for" | strprintf(_("Fees (in %s/kB) to charge per utxo created for" | ||||
"relaying, and mining (default: %s)"), | "relaying, and mining (default: %s)"), | ||||
CURRENCY_UNIT, FormatMoney(DEFAULT_UTXO_FEE))); | CURRENCY_UNIT, FormatMoney(DEFAULT_UTXO_FEE))); | ||||
strUsage += HelpMessageOpt( | strUsage += HelpMessageOpt( | ||||
"-minrelaytxfee=<amt>", | "-minrelaytxfee=<amt>", | ||||
strprintf( | strprintf( | ||||
_("Fees (in %s/kB) smaller than this are considered zero fee for " | _("Fees (in %s/kB) smaller than this are considered zero fee for " | ||||
"relaying, mining and transaction creation (default: %s)"), | "relaying, mining and transaction creation (default: %s)"), | ||||
CURRENCY_UNIT, FormatMoney(DEFAULT_MIN_RELAY_TX_FEE))); | CURRENCY_UNIT, FormatMoney(DEFAULT_MIN_RELAY_TX_FEE_PER_KB))); | ||||
strUsage += HelpMessageOpt( | 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( | strUsage += HelpMessageOpt( | ||||
"-printtoconsole", | "-printtoconsole", | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | strUsage += HelpMessageOpt( | ||||
"-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( | 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_PER_KB))); | ||||
if (showDebug) { | if (showDebug) { | ||||
strUsage += | strUsage += | ||||
HelpMessageOpt("-blockversion=<n>", | HelpMessageOpt("-blockversion=<n>", | ||||
"Override block version to test forking scenarios"); | "Override block version to test forking scenarios"); | ||||
} | } | ||||
strUsage += HelpMessageGroup(_("RPC server options:")); | strUsage += HelpMessageGroup(_("RPC server options:")); | ||||
strUsage += HelpMessageOpt("-server", | strUsage += HelpMessageOpt("-server", | ||||
▲ Show 20 Lines • Show All 761 Lines • ▼ Show 20 Lines | if (gArgs.IsArgSet("-minrelaytxfee")) { | ||||
auto parsed = ParseMoney(gArgs.GetArg("-minrelaytxfee", ""), n); | auto parsed = ParseMoney(gArgs.GetArg("-minrelaytxfee", ""), n); | ||||
if (!parsed || Amount::zero() == n) { | if (!parsed || Amount::zero() == n) { | ||||
return InitError(AmountErrMsg("minrelaytxfee", | return InitError(AmountErrMsg("minrelaytxfee", | ||||
gArgs.GetArg("-minrelaytxfee", ""))); | gArgs.GetArg("-minrelaytxfee", ""))); | ||||
} | } | ||||
// High fee check is done afterward in CWallet::ParameterInteraction() | // High fee check is done afterward in CWallet::ParameterInteraction() | ||||
config.SetMinFeePerKB(CFeeRate(n)); | config.SetMinFeePerKB(CFeeRate(n)); | ||||
} else { | } else { | ||||
config.SetMinFeePerKB(CFeeRate(DEFAULT_MIN_RELAY_TX_FEE)); | config.SetMinFeePerKB(CFeeRate(DEFAULT_MIN_RELAY_TX_FEE_PER_KB)); | ||||
} | } | ||||
// Sanity check argument for min fee for including tx in block | // Sanity check argument for min fee for including tx in block | ||||
// TODO: Harmonize which arguments need sanity checking and where that | // TODO: Harmonize which arguments need sanity checking and where that | ||||
// happens. | // happens. | ||||
if (gArgs.IsArgSet("-blockmintxfee")) { | if (gArgs.IsArgSet("-blockmintxfee")) { | ||||
Amount n = Amount::zero(); | Amount n = Amount::zero(); | ||||
if (!ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n)) { | if (!ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n)) { | ||||
▲ Show 20 Lines • Show All 685 Lines • Show Last 20 Lines |