Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 1,593 Lines • ▼ Show 20 Lines | #endif | ||||
if (gArgs.IsArgSet("-excessutxocharge")) { | if (gArgs.IsArgSet("-excessutxocharge")) { | ||||
Amount n = Amount::zero(); | Amount n = Amount::zero(); | ||||
auto parsed = ParseMoney(gArgs.GetArg("-excessutxocharge", ""), n); | auto parsed = ParseMoney(gArgs.GetArg("-excessutxocharge", ""), n); | ||||
if (!parsed || Amount::zero() > n) { | if (!parsed || Amount::zero() > n) { | ||||
return InitError(AmountErrMsg( | return InitError(AmountErrMsg( | ||||
"excessutxocharge", gArgs.GetArg("-excessutxocharge", ""))); | "excessutxocharge", gArgs.GetArg("-excessutxocharge", ""))); | ||||
} | } | ||||
config.SetExcessUTXOCharge(n); | config.SetExcessUTXOCharge(n); | ||||
} else { | |||||
config.SetExcessUTXOCharge(DEFAULT_UTXO_FEE); | |||||
} | } | ||||
// Fee-per-kilobyte amount considered the same as "free". If you are mining, | // Fee-per-kilobyte amount considered the same as "free". If you are mining, | ||||
// be careful setting this: if you set it to zero then a transaction spammer | // be careful setting this: if you set it to zero then a transaction spammer | ||||
// can cheaply fill blocks using 1-satoshi-fee transactions. It should be | // can cheaply fill blocks using 1-satoshi-fee transactions. It should be | ||||
// set above the real cost to you of processing a transaction. | // set above the real cost to you of processing a transaction. | ||||
if (gArgs.IsArgSet("-minrelaytxfee")) { | if (gArgs.IsArgSet("-minrelaytxfee")) { | ||||
Amount n = Amount::zero(); | Amount n = Amount::zero(); | ||||
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 WalletParameterInteraction() | // High fee check is done afterward in WalletParameterInteraction() | ||||
config.SetMinFeePerKB(CFeeRate(n)); | config.SetMinFeePerKB(CFeeRate(n)); | ||||
} else { | |||||
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 730 Lines • Show Last 20 Lines |