Changeset View
Changeset View
Standalone View
Standalone View
src/feerate.h
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | public: | ||||
} | } | ||||
friend bool operator>=(const CFeeRate &a, const CFeeRate &b) { | friend bool operator>=(const CFeeRate &a, const CFeeRate &b) { | ||||
return a.nSatoshisPerK >= b.nSatoshisPerK; | return a.nSatoshisPerK >= b.nSatoshisPerK; | ||||
} | } | ||||
CFeeRate &operator+=(const CFeeRate &a) { | CFeeRate &operator+=(const CFeeRate &a) { | ||||
nSatoshisPerK += a.nSatoshisPerK; | nSatoshisPerK += a.nSatoshisPerK; | ||||
return *this; | return *this; | ||||
} | } | ||||
CFeeRate operator+(const CFeeRate &a) { | |||||
return CFeeRate(nSatoshisPerK + a.nSatoshisPerK); | |||||
} | |||||
std::string ToString() const; | std::string ToString() const; | ||||
ADD_SERIALIZE_METHODS; | ADD_SERIALIZE_METHODS; | ||||
template <typename Stream, typename Operation> | template <typename Stream, typename Operation> | ||||
inline void SerializationOp(Stream &s, Operation ser_action) { | inline void SerializationOp(Stream &s, Operation ser_action) { | ||||
READWRITE(nSatoshisPerK); | READWRITE(nSatoshisPerK); | ||||
} | } | ||||
}; | }; | ||||
#endif // BITCOIN_FEERATE_H | #endif // BITCOIN_FEERATE_H |