Bitcoin
Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
CFeeRate Class Reference

#include <feerate.h>

Public Member Functions

 CFeeRate ()
 
template<typename I >
 CFeeRate (const I _nSatoshisPerK)
 
 CFeeRate (const CAmount &nFeePaid, size_t nBytes)
 
CAmount GetFee (size_t nBytes) const
 
CAmount GetFeePerK () const
 
CFeeRateoperator+= (const CFeeRate &a)
 
std::string ToString () const
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action)
 

Public Attributes

 ADD_SERIALIZE_METHODS
 

Private Attributes

CAmount nSatoshisPerK
 

Friends

bool operator< (const CFeeRate &a, const CFeeRate &b)
 
bool operator> (const CFeeRate &a, const CFeeRate &b)
 
bool operator== (const CFeeRate &a, const CFeeRate &b)
 
bool operator<= (const CFeeRate &a, const CFeeRate &b)
 
bool operator>= (const CFeeRate &a, const CFeeRate &b)
 
bool operator!= (const CFeeRate &a, const CFeeRate &b)
 

Detailed Description

Fee rate in satoshis per kilobyte: CAmount / kB

Constructor & Destructor Documentation

◆ CFeeRate() [1/3]

CFeeRate::CFeeRate ( )
inline

Fee rate of 0 satoshis per kB

◆ CFeeRate() [2/3]

template<typename I >
CFeeRate::CFeeRate ( const I  _nSatoshisPerK)
inline

◆ CFeeRate() [3/3]

CFeeRate::CFeeRate ( const CAmount nFeePaid,
size_t  nBytes 
)

Constructor for a fee rate in satoshis per kB. The size in bytes must not exceed (2^63 - 1)

Member Function Documentation

◆ GetFee()

CAmount CFeeRate::GetFee ( size_t  nBytes) const

Return the fee in satoshis for the given size in bytes.

◆ GetFeePerK()

CAmount CFeeRate::GetFeePerK ( ) const
inline

Return the fee in satoshis for a size of 1000 bytes

◆ operator+=()

CFeeRate& CFeeRate::operator+= ( const CFeeRate a)
inline

◆ SerializationOp()

template<typename Stream , typename Operation >
void CFeeRate::SerializationOp ( Stream &  s,
Operation  ser_action 
)
inline

◆ ToString()

std::string CFeeRate::ToString ( ) const

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const CFeeRate a,
const CFeeRate b 
)
friend

◆ operator<

bool operator< ( const CFeeRate a,
const CFeeRate b 
)
friend

◆ operator<=

bool operator<= ( const CFeeRate a,
const CFeeRate b 
)
friend

◆ operator==

bool operator== ( const CFeeRate a,
const CFeeRate b 
)
friend

◆ operator>

bool operator> ( const CFeeRate a,
const CFeeRate b 
)
friend

◆ operator>=

bool operator>= ( const CFeeRate a,
const CFeeRate b 
)
friend

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CFeeRate::ADD_SERIALIZE_METHODS

◆ nSatoshisPerK

CAmount CFeeRate::nSatoshisPerK
private

The documentation for this class was generated from the following files: