12 #include "validation.h" 34 fee_needed = coin_control.
m_feerate->GetFee(nTxBytes);
47 bool conservative_estimate = !coin_control.
signalRbf;
53 if (fee_needed == 0) {
60 if (fee_needed < min_mempool_fee) {
61 fee_needed = min_mempool_fee;
68 if (required_fee > fee_needed) {
69 fee_needed = required_fee;
CFeeRate GetDiscardRate(const CBlockPolicyEstimator &estimator)
Return the maximum feerate for discarding change.
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...
CAmount GetRequiredFee(unsigned int nTxBytes)
Return the minimum required fee taking into account the floating relay fee and user set minimum trans...
bool fOverrideFeeRate
Override automatic min/max checks on fee, m_feerate must be set if true.
boost::optional< CFeeRate > m_feerate
Override the default payTxFee if set.
int64_t CAmount
Amount in corbies (Can be negative)
Force estimateSmartFee to use non-conservative estimates.
bool AreMessagingDeployed()
unsigned int nTxConfirmTarget
static CFeeRate m_discard_rate
bool signalRbf
Signal BIP-125 replace by fee.
CFeeRate minRelayTxFee
A fee rate smaller than this is considered zero fee (for relaying, mining and transaction creation) ...
We want to be able to estimate feerates that are needed on tx's to be included in a certain number of...
CFeeRate estimateSmartFee(int confTarget, FeeCalculation *feeCalc, bool conservative) const
Estimate feerate needed to get be included in a block within confTarget blocks.
CFeeRate GetMinFee(size_t sizelimit) const
The minimum fee to get into the mempool, which may itself not be enough for larger-sized transactions...
CFeeRate minRelayTxFeeV2
A fee rate smaller than this is considered zero fee (for relaying, mining and transaction creation) ...
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 ...
static CFeeRate fallbackFee
If fee estimation does not have enough data to provide estimates, use this fee instead.
std::string GetArg(const std::string &strArg, const std::string &strDefault) const
Return string argument or default value.
static CFeeRate minTxFee
Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) Override with ...
Fee rate in satoshis per kilobyte: CAmount / kB.
CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE)
Transaction fee set by the user.
FeeEstimateMode m_fee_mode
Fee estimation mode to control arguments to estimateSmartFee.
Use default settings based on other criteria.
CAmount GetMinimumFee(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.
CAmount GetFee(size_t nBytes) const
Return the fee in satoshis for the given size in bytes.