29 return std::max(
wallet.m_min_fee,
wallet.chain().relayMinFee());
63 CFeeRate fee_rate{estimation.feerate};
66 std::optional<int> returned_target{estimation.returned_target};
69 fee_rate =
wallet.m_fallback_fee;
71 returned_target = std::nullopt;
81 returned_target = std::nullopt;
87 return {fee_rate, fee_reason, returned_target};
int64_t CAmount
Amount in satoshis (Can be negative)
Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac.
FeePerVSize m_feerate
Fee rate in sats/vB (satoshis per N virtualbytes)
CAmount GetFee(int32_t virtual_bytes) const
Return the fee in satoshis for the given vsize in vbytes.
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
CFeeRate GetRequiredFeeRate(const CWallet &wallet)
Return the minimum required feerate taking into account the minimum relay feerate and user set minimu...
MinimumFeeRateResult GetMinimumFeeRate(const CWallet &wallet, const CCoinControl &coin_control)
Estimate the minimum fee rate considering user set parameters and the required fee.
CAmount GetMinimumFee(const MinimumFeeRateResult &min_fee_rate, unsigned int nTxBytes)
Return the minimum fee for this size given a fee rate result.
CFeeRate GetDiscardRate(const CWallet &wallet)
Return the maximum feerate for discarding change.
CAmount GetRequiredFee(const CWallet &wallet, unsigned int nTxBytes)
Return the minimum required absolute fee for this size based on the required fee rate.
A successful fee rate estimate returned by a fee rate estimator.
const FeeRateEstimation & FeeRateEstimationRef(const util::Expected< FeeRateEstimation, FeeRateEstimationError > &result LIFETIMEBOUND)
Return the estimation carried by a fee rate estimate result: the successful estimation,...
@ CONSERVATIVE
Force Fee rate estimator to return conservative estimates.
@ ECONOMICAL
Force Fee rate estimator to return non-conservative estimates.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.