PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
CBlockAverage Class Reference

Keep track of fee/priority for transactions confirmed within N blocks. More...

Public Member Functions

 CBlockAverage ()
 
void RecordFee (const CFeeRate &feeRate)
 
void RecordPriority (double priority)
 
size_t FeeSamples () const
 
size_t GetFeeSamples (std::vector< CFeeRate > &insertInto) const
 
size_t PrioritySamples () const
 
size_t GetPrioritySamples (std::vector< double > &insertInto) const
 
void Write (CAutoFile &fileout) const
 
void Read (CAutoFile &filein, const CFeeRate &minRelayFee)
 

Static Public Member Functions

static bool AreSane (const CFeeRate fee, const CFeeRate &minRelayFee)
 Used as belt-and-suspenders check when reading to detect file corruption. More...
 
static bool AreSane (const std::vector< CFeeRate > &vecFee, const CFeeRate &minRelayFee)
 
static bool AreSane (const double priority)
 
static bool AreSane (const std::vector< double > vecPriority)
 

Private Member Functions

template<typename T >
std::vector< T > buf2vec (boost::circular_buffer< T > buf) const
 

Private Attributes

boost::circular_buffer< CFeeRatefeeSamples
 
boost::circular_buffer< double > prioritySamples
 

Detailed Description

Keep track of fee/priority for transactions confirmed within N blocks.

Definition at line 46 of file txmempool.cpp.

Constructor & Destructor Documentation

◆ CBlockAverage()

CBlockAverage::CBlockAverage ( )
inline

Definition at line 60 of file txmempool.cpp.

Member Function Documentation

◆ AreSane() [1/4]

static bool CBlockAverage::AreSane ( const CFeeRate  fee,
const CFeeRate minRelayFee 
)
inlinestatic

Used as belt-and-suspenders check when reading to detect file corruption.

Definition at line 91 of file txmempool.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AreSane() [2/4]

static bool CBlockAverage::AreSane ( const double  priority)
inlinestatic

Definition at line 107 of file txmempool.cpp.

◆ AreSane() [3/4]

static bool CBlockAverage::AreSane ( const std::vector< CFeeRate > &  vecFee,
const CFeeRate minRelayFee 
)
inlinestatic

Definition at line 99 of file txmempool.cpp.

Here is the call graph for this function:

◆ AreSane() [4/4]

static bool CBlockAverage::AreSane ( const std::vector< double >  vecPriority)
inlinestatic

Definition at line 111 of file txmempool.cpp.

Here is the call graph for this function:

◆ buf2vec()

template<typename T >
std::vector<T> CBlockAverage::buf2vec ( boost::circular_buffer< T >  buf) const
inlineprivate

Definition at line 53 of file txmempool.cpp.

Here is the caller graph for this function:

◆ FeeSamples()

size_t CBlockAverage::FeeSamples ( ) const
inline

Definition at line 72 of file txmempool.cpp.

◆ GetFeeSamples()

size_t CBlockAverage::GetFeeSamples ( std::vector< CFeeRate > &  insertInto) const
inline

Definition at line 73 of file txmempool.cpp.

◆ GetPrioritySamples()

size_t CBlockAverage::GetPrioritySamples ( std::vector< double > &  insertInto) const
inline

Definition at line 80 of file txmempool.cpp.

◆ PrioritySamples()

size_t CBlockAverage::PrioritySamples ( ) const
inline

Definition at line 79 of file txmempool.cpp.

◆ Read()

void CBlockAverage::Read ( CAutoFile filein,
const CFeeRate minRelayFee 
)
inline

Definition at line 128 of file txmempool.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RecordFee()

void CBlockAverage::RecordFee ( const CFeeRate feeRate)
inline

Definition at line 62 of file txmempool.cpp.

◆ RecordPriority()

void CBlockAverage::RecordPriority ( double  priority)
inline

Definition at line 67 of file txmempool.cpp.

◆ Write()

void CBlockAverage::Write ( CAutoFile fileout) const
inline

Definition at line 120 of file txmempool.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ feeSamples

boost::circular_buffer<CFeeRate> CBlockAverage::feeSamples
private

Definition at line 49 of file txmempool.cpp.

◆ prioritySamples

boost::circular_buffer<double> CBlockAverage::prioritySamples
private

Definition at line 50 of file txmempool.cpp.


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