25 return std::max(
wallet.m_min_fee,
wallet.chain().relayMinFee());
39 feerate_needed = *(coin_control.
m_feerate);
45 feerate_needed =
wallet.m_pay_tx_fee;
57 feerate_needed =
wallet.chain().estimateSmartFee(target, conservative_estimate, feeCalc);
60 feerate_needed =
wallet.m_fallback_fee;
68 if (feerate_needed < min_mempool_feerate) {
69 feerate_needed = min_mempool_feerate;
76 if (required_feerate > feerate_needed) {
77 feerate_needed = required_feerate;
80 return feerate_needed;
85 unsigned int highest_target =
wallet.chain().estimateMaxBlocks();
86 CFeeRate discard_rate =
wallet.chain().estimateSmartFee(highest_target,
false );
88 discard_rate = (discard_rate ==
CFeeRate(0)) ?
wallet.m_discard_rate : std::min(discard_rate,
wallet.m_discard_rate);
90 discard_rate = std::max(discard_rate,
wallet.chain().relayDustFee());
int64_t CAmount
Amount in satoshis (Can be negative)
std::optional< bool > m_signal_bip125_rbf
Override the wallet's m_signal_rbf if set.
std::optional< unsigned int > m_confirm_target
Override the default confirmation target if set.
std::optional< CFeeRate > m_feerate
Override the wallet's m_pay_tx_fee if set.
bool fOverrideFeeRate
Override automatic min/max checks on fee, m_feerate must be set if true.
FeeEstimateMode m_fee_mode
Fee estimation mode to control arguments to estimateSmartFee.
Fee rate in satoshis per kilobyte: CAmount / kB.
CAmount GetFee(uint32_t num_bytes) const
Return the fee in satoshis for the given size in bytes.
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
@ CONSERVATIVE
Force estimateSmartFee to use conservative estimates.
@ ECONOMICAL
Force estimateSmartFee to use non-conservative estimates.
CFeeRate GetMinimumFeeRate(const CWallet &wallet, const CCoinControl &coin_control, FeeCalculation *feeCalc)
Estimate the minimum fee rate considering user set parameters and the required fee.
CAmount GetRequiredFee(const CWallet &wallet, unsigned int nTxBytes)
Return the minimum required absolute fee for this size based on the required fee rate.
CFeeRate GetDiscardRate(const CWallet &wallet)
Return the maximum feerate for discarding change.
CFeeRate GetRequiredFeeRate(const CWallet &wallet)
Return the minimum required feerate taking into account the minimum relay feerate and user set minimu...
CAmount GetMinimumFee(const CWallet &wallet, unsigned int nTxBytes, const CCoinControl &coin_control, FeeCalculation *feeCalc)
Estimate the minimum fee considering user set parameters and the required fee.