6 #ifndef BITCOIN_POLICY_FEERATE_H 7 #define BITCOIN_POLICY_FEERATE_H 17 #include <type_traits> 40 template<std::
integral I>
65 return FeeRateCompare(a.m_feerate, b.m_feerate);
69 return FeeRateCompare(a.m_feerate, b.m_feerate) == std::weak_ordering::equivalent;
82 #endif // BITCOIN_POLICY_FEERATE_H
friend CFeeRate operator*(const CFeeRate &f, int a)
Use BTC/kvB fee rate unit.
SERIALIZE_METHODS(CFeeRate, obj)
int64_t CAmount
Amount in satoshis (Can be negative)
friend bool operator==(const CFeeRate &a, const CFeeRate &b) noexcept
FeePerVSize GetFeePerVSize() const
CFeeRate(const I m_feerate_kvb)
FeePerUnit< VSizeTag > FeePerVSize
const std::string CURRENCY_ATOM
CFeeRate & operator+=(const CFeeRate &a)
const std::string CURRENCY_UNIT
friend CFeeRate operator*(int a, const CFeeRate &f)
std::string ToString(FeeRateFormat fee_rate_format=FeeRateFormat::BTC_KVB) const
FeePerVSize m_feerate
Fee rate in sats/vB (satoshis per N virtualbytes)
Use sat/vB fee rate unit.
Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac...
CFeeRate()=default
Fee rate of 0 satoshis per 0 vB.
CAmount GetFee(int32_t virtual_bytes) const
Return the fee in satoshis for the given vsize in vbytes.
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.
CAmount GetFeePerK() const
Return the fee in satoshis for a vsize of 1000 vbytes.