Dash Core  0.12.2.1
P2P Digital Currency
CFeeRate Class Reference

#include <amount.h>

Public Member Functions

 CFeeRate ()
 
 CFeeRate (const CAmount &_nSatoshisPerK)
 
 CFeeRate (const CAmount &nFeePaid, size_t nSize)
 
 CFeeRate (const CFeeRate &other)
 
CAmount GetFee (size_t size) const
 
CAmount GetFeePerK () const
 
CFeeRateoperator+= (const CFeeRate &a)
 
std::string ToString () const
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion)
 

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)
 

Detailed Description

Type-safe wrapper class for fee rates (how much to pay based on transaction size)

Definition at line 36 of file amount.h.

Constructor & Destructor Documentation

◆ CFeeRate() [1/4]

CFeeRate::CFeeRate ( )
inline

Definition at line 41 of file amount.h.

◆ CFeeRate() [2/4]

CFeeRate::CFeeRate ( const CAmount _nSatoshisPerK)
inlineexplicit

Definition at line 42 of file amount.h.

◆ CFeeRate() [3/4]

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

Definition at line 12 of file amount.cpp.

◆ CFeeRate() [4/4]

CFeeRate::CFeeRate ( const CFeeRate other)
inline

Definition at line 44 of file amount.h.

Member Function Documentation

◆ GetFee()

◆ GetFeePerK()

◆ operator+=()

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

Definition at line 54 of file amount.h.

◆ SerializationOp()

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

Definition at line 60 of file amount.h.

◆ ToString()

std::string CFeeRate::ToString ( ) const

Definition at line 30 of file amount.cpp.

Referenced by AcceptToMemoryPoolWorker(), AppInit2(), and CTxMemPool::TrimToSize().

Friends And Related Function Documentation

◆ operator<

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

Definition at line 49 of file amount.h.

◆ operator<=

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

Definition at line 52 of file amount.h.

◆ operator==

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

Definition at line 51 of file amount.h.

◆ operator>

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

Definition at line 50 of file amount.h.

◆ operator>=

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

Definition at line 53 of file amount.h.

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CFeeRate::ADD_SERIALIZE_METHODS

Definition at line 57 of file amount.h.

◆ nSatoshisPerK

CAmount CFeeRate::nSatoshisPerK
private

Definition at line 39 of file amount.h.

Referenced by CFeeRate(), GetFee(), operator+=(), SerializationOp(), and ToString().


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