7#ifndef BITCOIN_FEERATE_H
8#define BITCOIN_FEERATE_H
60 return a.nSatoshisPerK ==
b.nSatoshisPerK;
70 return a.nSatoshisPerK <
b.nSatoshisPerK;
73 return a.nSatoshisPerK >
b.nSatoshisPerK;
76 return a.nSatoshisPerK <=
b.nSatoshisPerK;
79 return a.nSatoshisPerK >=
b.nSatoshisPerK;
Fee rate in satoshis per kilobyte: Amount / kB.
constexpr CFeeRate()
Fee rate of 0 satoshis per kB.
friend constexpr bool operator!=(const CFeeRate a, const CFeeRate b)
friend bool operator>=(const CFeeRate &a, const CFeeRate &b)
std::string ToString() const
SERIALIZE_METHODS(CFeeRate, obj)
constexpr CFeeRate(const Amount _nSatoshisPerK)
friend bool operator>(const CFeeRate &a, const CFeeRate &b)
Amount GetFeePerK() const
Return the fee in satoshis for a size of 1000 bytes.
friend constexpr bool operator==(const CFeeRate a, const CFeeRate b)
Equality.
friend bool operator<(const CFeeRate &a, const CFeeRate &b)
Comparison.
Amount GetFee(size_t nBytes) const
Return the fee in satoshis for the given size in bytes.
Amount GetFeeCeiling(size_t nBytes) const
Return the ceiling of a fee calculation in satoshis for the given size in bytes.
friend bool operator<=(const CFeeRate &a, const CFeeRate &b)
CFeeRate & operator+=(const CFeeRate &a)
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...