7#ifndef BITCOIN_FEERATE_H
8#define BITCOIN_FEERATE_H
61 return FeeRateCompare(a.m_feerate, b.m_feerate);
64 return FeeRateCompare(a.m_feerate, b.m_feerate) ==
65 std::weak_ordering::equivalent;
76 READWRITE(obj.m_feerate.fee, obj.m_feerate.size);
static constexpr Amount SATOSHI
Fee rate in satoshis per virtualbyte: Amount / vB the feerate is represented internally as FeeFrac.
friend std::weak_ordering operator<=>(const CFeeRate &a, const CFeeRate &b) noexcept
friend bool operator==(const CFeeRate &a, const CFeeRate &b) noexcept
Amount GetFee(int32_t virtual_bytes) const
Return the fee in satoshis for the given size in bytes.
std::string ToString() const
SERIALIZE_METHODS(CFeeRate, obj)
Amount GetFeePerK() const
Return the fee in satoshis for a size of 1000 bytes.
CFeeRate(const Amount m_feerate_kvb)
CFeeRate & operator+=(const CFeeRate &a)
FeePerUnit< VSizeTag > FeePerVSize
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.