Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/init.cpp
Show First 20 Lines • Show All 225 Lines • ▼ Show 20 Lines | if (gArgs.IsArgSet("-maxtxfee")) { | ||||
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.")); | ||||
} | } | ||||
config.SetMaxFee(nMaxFee); | config.SetMaxFeePerKB(CFeeRate(nMaxFee)); | ||||
if (CFeeRate(nMaxFee, 1000) < minRelayTxFee) { | if (CFeeRate(nMaxFee, 1000) < minRelayTxFee) { | ||||
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())); | ||||
} | } | ||||
} else { | } else { | ||||
config.SetMaxFee(DEFAULT_TRANSACTION_MAXFEE); | config.SetMaxFeePerKB(CFeeRate(DEFAULT_TRANSACTION_MAXFEE_PER_KB)); | ||||
} | } | ||||
nTxConfirmTarget = | nTxConfirmTarget = | ||||
gArgs.GetArg("-txconfirmtarget", DEFAULT_TX_CONFIRM_TARGET); | gArgs.GetArg("-txconfirmtarget", DEFAULT_TX_CONFIRM_TARGET); | ||||
bSpendZeroConfChange = | bSpendZeroConfChange = | ||||
gArgs.GetBoolArg("-spendzeroconfchange", DEFAULT_SPEND_ZEROCONF_CHANGE); | gArgs.GetBoolArg("-spendzeroconfchange", DEFAULT_SPEND_ZEROCONF_CHANGE); | ||||
return true; | return true; | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |