Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/init.cpp
Show First 20 Lines • Show All 213 Lines • ▼ Show 20 Lines | if (gArgs.IsArgSet("-paytxfee")) { | ||||
if (payTxFee < minRelayTxFee) { | if (payTxFee < minRelayTxFee) { | ||||
return InitError(strprintf( | return InitError(strprintf( | ||||
_("Invalid amount for -paytxfee=<amount>: '%s' (must " | _("Invalid amount for -paytxfee=<amount>: '%s' (must " | ||||
"be at least %s)"), | "be at least %s)"), | ||||
gArgs.GetArg("-paytxfee", ""), minRelayTxFee.ToString())); | gArgs.GetArg("-paytxfee", ""), minRelayTxFee.ToString())); | ||||
} | } | ||||
} | } | ||||
config.SetMaxFee(DEFAULT_TRANSACTION_MAXFEE); | config.SetMaxFeePerKB(CFeeRate(DEFAULT_TRANSACTION_MAXFEE_PER_KB)); | ||||
if (gArgs.IsArgSet("-maxtxfee")) { | if (gArgs.IsArgSet("-maxtxfee")) { | ||||
Amount nMaxFee = Amount::zero(); | Amount nMaxFee = Amount::zero(); | ||||
if (!ParseMoney(gArgs.GetArg("-maxtxfee", ""), nMaxFee)) { | if (!ParseMoney(gArgs.GetArg("-maxtxfee", ""), nMaxFee)) { | ||||
return InitError( | return InitError( | ||||
AmountErrMsg("maxtxfee", gArgs.GetArg("-maxtxfee", ""))); | AmountErrMsg("maxtxfee", gArgs.GetArg("-maxtxfee", ""))); | ||||
} | } | ||||
if (nMaxFee > HIGH_MAX_TX_FEE) { | if (nMaxFee > HIGH_MAX_TX_FEE) { | ||||
InitWarning(_("-maxtxfee is set very high! Fees this large could " | InitWarning(_("-maxtxfee is set very high! Fees this large could " | ||||
"be paid on a single transaction.")); | "be paid on a single transaction.")); | ||||
} | } | ||||
if (!config.SetMaxFee(nMaxFee)) { | if (!config.SetMaxFeePerKB(CFeeRate(nMaxFee))) { | ||||
return InitError(strprintf( | return InitError(strprintf( | ||||
_("Invalid amount for -maxtxfee=<amount>: '%s' (must " | _("Invalid amount for -maxtxfee=<amount>: '%s' (must " | ||||
"be at least the minrelay fee of %s to prevent " | "be at least the minrelay fee of %s to prevent " | ||||
"stuck transactions)"), | "stuck transactions)"), | ||||
gArgs.GetArg("-maxtxfee", ""), minRelayTxFee.ToString())); | gArgs.GetArg("-maxtxfee", ""), minRelayTxFee.ToString())); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |