Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
| Show First 20 Lines • Show All 3,057 Lines • ▼ Show 20 Lines | assert(txNew.nLockTime < LOCKTIME_THRESHOLD); | ||||
| // CoinControl instance. | // CoinControl instance. | ||||
| int currentConfirmationTarget = nTxConfirmTarget; | int currentConfirmationTarget = nTxConfirmTarget; | ||||
| if (coinControl && coinControl->nConfirmTarget > 0) { | if (coinControl && coinControl->nConfirmTarget > 0) { | ||||
| currentConfirmationTarget = coinControl->nConfirmTarget; | currentConfirmationTarget = coinControl->nConfirmTarget; | ||||
| } | } | ||||
| Amount nFeeNeeded = | Amount nFeeNeeded = | ||||
| GetMinimumFee(nBytes, currentConfirmationTarget, g_mempool); | GetMinimumFee(nBytes, currentConfirmationTarget, g_mempool); | ||||
| if (coinControl && nFeeNeeded > Amount::zero() && | |||||
| coinControl->nMinimumTotalFee > nFeeNeeded) { | |||||
| nFeeNeeded = coinControl->nMinimumTotalFee; | |||||
| } | |||||
| if (coinControl && coinControl->fOverrideFeeRate) { | if (coinControl && coinControl->fOverrideFeeRate) { | ||||
| nFeeNeeded = coinControl->nFeeRate.GetFeeCeiling(nBytes); | nFeeNeeded = coinControl->nFeeRate.GetFeeCeiling(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. | ||||
| Amount minFee = GetConfig().GetMinFeePerKB().GetFeeCeiling(nBytes); | Amount minFee = GetConfig().GetMinFeePerKB().GetFeeCeiling(nBytes); | ||||
| ▲ Show 20 Lines • Show All 1,333 Lines • Show Last 20 Lines | |||||