Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

Fee rate in satoshis per kilobyte: CAmount / kB. More...

#include <feerate.h>

Public Member Functions

 CFeeRate ()
 Fee rate of 0 satoshis per kB. More...
 
template<typename I >
 CFeeRate (const I _nSatoshisPerK)
 
 CFeeRate (const CAmount &nFeePaid, size_t nBytes)
 Constructor for a fee rate in satoshis per kB. More...
 
CAmount GetFee (size_t nBytes) const
 Return the fee in satoshis for the given size in bytes. More...
 
CAmount GetFeePerK () const
 Return the fee in satoshis for a size of 1000 bytes. More...
 
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.

Definition at line 19 of file feerate.h.

Constructor & Destructor Documentation

◆ CFeeRate() [1/3]

CFeeRate::CFeeRate ( )
inline

Fee rate of 0 satoshis per kB.

Definition at line 26 of file feerate.h.

◆ CFeeRate() [2/3]

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

Definition at line 28 of file feerate.h.

◆ 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)

Definition at line 12 of file feerate.cpp.

References nSatoshisPerK.

Member Function Documentation

◆ GetFee()

CAmount CFeeRate::GetFee ( size_t  nBytes) const

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

Definition at line 23 of file feerate.cpp.

References nSatoshisPerK.

Referenced by AcceptToMemoryPoolWorker(), BlockAssembler::addPackageTxs(), CWallet::CreateTransaction(), GetDustThreshold(), GetFeePerK(), GetInfo(), GetMinimumFee(), and GetRequiredFee().

◆ GetFeePerK()

◆ operator+=()

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

Definition at line 48 of file feerate.h.

References nSatoshisPerK.

◆ SerializationOp()

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

Definition at line 54 of file feerate.h.

References nSatoshisPerK, and READWRITE.

◆ ToString()

std::string CFeeRate::ToString ( ) const

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 47 of file feerate.h.

◆ operator<

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

Definition at line 42 of file feerate.h.

◆ operator<=

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

Definition at line 45 of file feerate.h.

◆ operator==

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

Definition at line 44 of file feerate.h.

◆ operator>

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

Definition at line 43 of file feerate.h.

◆ operator>=

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

Definition at line 46 of file feerate.h.

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CFeeRate::ADD_SERIALIZE_METHODS

Definition at line 51 of file feerate.h.

◆ nSatoshisPerK

CAmount CFeeRate::nSatoshisPerK
private

Definition at line 22 of file feerate.h.

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


The documentation for this class was generated from the following files:
Released under the MIT license