Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 2,940 Lines • ▼ Show 20 Lines | assert(txNew.nLockTime < LOCKTIME_THRESHOLD); | ||||
if (coinControl && coinControl->fOverrideFeeRate) { | if (coinControl && coinControl->fOverrideFeeRate) { | ||||
nFeeNeeded = coinControl->nFeeRate.GetFee(nBytes); | nFeeNeeded = coinControl->nFeeRate.GetFee(nBytes); | ||||
} | } | ||||
// If we made it here and we aren't even able to meet the relay fee | // If we made it here and we aren't even able to meet the relay fee | ||||
// on the next pass, give up because we must be at the maximum | // on the next pass, give up because we must be at the maximum | ||||
// allowed fee. | // allowed fee. | ||||
if (nFeeNeeded < ::minRelayTxFee.GetFee(nBytes)) { | Amount minFee = GetConfig().GetMinFeePerKB().GetFee(nBytes); | ||||
if (nFeeNeeded < minFee) { | |||||
strFailReason = _("Transaction too large for fee policy"); | strFailReason = _("Transaction too large for fee policy"); | ||||
return false; | return false; | ||||
} | } | ||||
if (nFeeRet >= nFeeNeeded) { | if (nFeeRet >= nFeeNeeded) { | ||||
// Reduce fee to only the needed amount if we have change output | // Reduce fee to only the needed amount if we have change output | ||||
// to increase. This prevents potential overpayment in fees if | // to increase. This prevents potential overpayment in fees if | ||||
// the coins selected to meet nFeeNeeded result in a transaction | // the coins selected to meet nFeeNeeded result in a transaction | ||||
▲ Show 20 Lines • Show All 1,614 Lines • Show Last 20 Lines |