11 #include <validation.h> 49 feerate_needed = *(coin_control.
m_feerate);
67 feerate_needed = estimator.
estimateSmartFee(target, feeCalc, conservative_estimate);
78 if (feerate_needed < min_mempool_feerate) {
79 feerate_needed = min_mempool_feerate;
86 if (required_feerate > feerate_needed) {
87 feerate_needed = required_feerate;
90 return feerate_needed;
CAmount GetMinimumFee(const CWallet &wallet, unsigned int nTxBytes, const CCoinControl &coin_control, const CTxMemPool &pool, const CBlockPolicyEstimator &estimator, FeeCalculation *feeCalc)
Estimate the minimum fee considering user set parameters and the required fee.
boost::optional< unsigned int > m_confirm_target
Override the default confirmation target if set.
CAmount maxTxFee
Absolute maximum transaction fee (in satoshis) used by wallet and mempool (rejects high fee in sendra...
bool fOverrideFeeRate
Override automatic min/max checks on fee, m_feerate must be set if true.
CFeeRate m_min_fee
Override with -mintxfee.
boost::optional< CFeeRate > m_feerate
Override the wallet's m_pay_tx_fee if set.
int64_t CAmount
Amount in satoshis (Can be negative)
CFeeRate m_fallback_fee
If fee estimation does not have enough data to provide estimates, use this fee instead.
Force estimateSmartFee to use conservative estimates.
CFeeRate minRelayTxFee
A fee rate smaller than this is considered zero fee (for relaying, mining and transaction creation) ...
The BlockPolicyEstimator is used for estimating the feerate needed for a transaction to be included i...
CFeeRate estimateSmartFee(int confTarget, FeeCalculation *feeCalc, bool conservative) const
Estimate feerate needed to get be included in a block within confTarget blocks.
CFeeRate GetMinimumFeeRate(const CWallet &wallet, const CCoinControl &coin_control, const CTxMemPool &pool, const CBlockPolicyEstimator &estimator, FeeCalculation *feeCalc)
Estimate the minimum fee rate considering user set parameters and the required fee.
CFeeRate GetMinFee(size_t sizelimit) const
The minimum fee to get into the mempool, which may itself not be enough for larger-sized transactions...
boost::optional< bool > m_signal_bip125_rbf
Override the wallet's m_signal_rbf if set.
CFeeRate GetRequiredFeeRate(const CWallet &wallet)
Return the minimum required feerate taking into account the minimum relay feerate and user set minimu...
unsigned int HighestTargetTracked(FeeEstimateHorizon horizon) const
Calculation of highest target that estimates are tracked for.
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
unsigned int m_confirm_target
CFeeRate GetDiscardRate(const CWallet &wallet, const CBlockPolicyEstimator &estimator)
Return the maximum feerate for discarding change.
std::string GetArg(const std::string &strArg, const std::string &strDefault) const
Return string argument or default value.
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
Fee rate in satoshis per kilobyte: CAmount / kB.
FeeEstimateMode m_fee_mode
Fee estimation mode to control arguments to estimateSmartFee.
CAmount GetRequiredFee(const CWallet &wallet, unsigned int nTxBytes)
Return the minimum required absolute fee for this size based on the required fee rate.
Force estimateSmartFee to use non-conservative estimates.
CAmount GetFee(size_t nBytes) const
Return the fee in satoshis for the given size in bytes.