| 20 | |
| 21 | |
| 22 | CAmount GetMinimumFee(const CWallet& wallet, unsigned int nTxBytes, const CCoinControl& coin_control, const CTxMemPool& pool, const CBlockPolicyEstimator& estimator, FeeCalculation* feeCalc) |
| 23 | { |
| 24 | CAmount fee_needed = GetMinimumFeeRate(wallet, coin_control, pool, estimator, feeCalc).GetFee(nTxBytes); |
| 25 | // Always obey the maximum |
| 26 | if (fee_needed > maxTxFee) { |
| 27 | fee_needed = maxTxFee; |
| 28 | if (feeCalc) feeCalc->reason = FeeReason::MAXTXFEE; |
| 29 | } |
| 30 | return fee_needed; |
| 31 | } |
| 32 | |
| 33 | CFeeRate GetRequiredFeeRate(const CWallet& wallet) |
| 34 | { |
no test coverage detected