6#ifndef BITCOIN_POLICY_FEERATE_H
7#define BITCOIN_POLICY_FEERATE_H
43 template<std::
integral I>
66 return FeeRateCompare(a.m_feerate, b.m_feerate);
70 return FeeRateCompare(a.m_feerate, b.m_feerate) == std::weak_ordering::equivalent;
int64_t CAmount
Amount in satoshis (Can be negative)
Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac.
std::string ToString(const FeeEstimateMode &fee_estimate_mode=FeeEstimateMode::BTC_KVB) const
friend std::weak_ordering operator<=>(const CFeeRate &a, const CFeeRate &b) noexcept
CFeeRate()=default
Fee rate of 0 satoshis per 0 vB.
friend bool operator==(const CFeeRate &a, const CFeeRate &b) noexcept
CFeeRate(const I m_feerate_kvb)
friend CFeeRate operator*(int a, const CFeeRate &f)
FeePerVSize m_feerate
Fee rate in sats/vB (satoshis per N virtualbytes)
SERIALIZE_METHODS(CFeeRate, obj)
friend CFeeRate operator*(const CFeeRate &f, int a)
CAmount GetFeePerK() const
Return the fee in satoshis for a vsize of 1000 vbytes.
CAmount GetFee(int32_t virtual_bytes) const
Return the fee in satoshis for the given vsize in vbytes.
CFeeRate & operator+=(const CFeeRate &a)
FeePerUnit< VSizeTag > FeePerVSize
const std::string CURRENCY_ATOM
const std::string CURRENCY_UNIT
@ CONSERVATIVE
Force estimateSmartFee to use conservative estimates.
@ UNSET
Use default settings based on other criteria.
@ BTC_KVB
Use BTC/kvB fee rate unit.
@ ECONOMICAL
Force estimateSmartFee to use non-conservative estimates.
@ SAT_VB
Use sat/vB fee rate unit.
int64_t EvaluateFeeDown(int32_t at_size) const noexcept
Compute the fee for a given size at_size using this object's feerate, rounding down.