6 #ifndef BITCOIN_AMOUNT_H
7 #define BITCOIN_AMOUNT_H
17 static const CAmount COIN = 100000000;
18 static const CAmount CENT = 1000000;
31 static const CAmount MAX_MONEY = 10000000000 * COIN;
32 inline bool MoneyRange(
const CAmount& nValue) {
return (nValue >= 0 && nValue <= MAX_MONEY); }
66 template <
typename Stream,
typename Operation>
bool MoneyRange(const CAmount &nValue)
int64_t CAmount
Amount in satoshis (Can be negative)
const std::string CURRENCY_UNIT
Fee rate in satoshis per kilobyte: CAmount / kB.
CAmount GetFee(size_t nBytes) const
Return the fee in satoshis for the given size in bytes.
CFeeRate & operator+=(const CFeeRate &a)
friend bool operator>=(const CFeeRate &a, const CFeeRate &b)
std::string ToString() const
void SerializationOp(Stream &s, Operation ser_action)
friend bool operator==(const CFeeRate &a, const CFeeRate &b)
CFeeRate(const CFeeRate &other)
friend bool operator>(const CFeeRate &a, const CFeeRate &b)
CFeeRate(const CAmount &_nSatoshisPerK)
friend bool operator<(const CFeeRate &a, const CFeeRate &b)
CAmount GetFeePerK() const
Return the fee in satoshis for a size of 1000 bytes.
CFeeRate()
Fee rate of 0 satoshis per kB.
friend bool operator<=(const CFeeRate &a, const CFeeRate &b)