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

Public Member Functions

 CMinerPolicyEstimator (int nEntries)
 
void seenBlock (const std::vector< CTxMemPoolEntry > &entries, int nBlockHeight, const CFeeRate minRelayFee)
 
CFeeRate estimateFee (int nBlocksToConfirm)
 Can return CFeeRate(0) if we don't have any data for that many blocks back. More...
 
double estimatePriority (int nBlocksToConfirm)
 
void Write (CAutoFile &fileout) const
 
void Read (CAutoFile &filein, const CFeeRate &minRelayFee)
 

Private Member Functions

void seenTxConfirm (const CFeeRate &feeRate, const CFeeRate &minRelayFee, double dPriority, int nBlocksAgo)
 nBlocksAgo is 0 based, i.e. More...
 

Private Attributes

std::vector< CBlockAveragehistory
 Records observed averages transactions that confirmed within one block, two blocks, three blocks etc. More...
 
std::vector< CFeeRatesortedFeeSamples
 
std::vector< double > sortedPrioritySamples
 
int nBestSeenHeight
 

Detailed Description

Definition at line 148 of file txmempool.cpp.

Constructor & Destructor Documentation

◆ CMinerPolicyEstimator()

CMinerPolicyEstimator::CMinerPolicyEstimator ( int  nEntries)
inline

Definition at line 191 of file txmempool.cpp.

Member Function Documentation

◆ estimateFee()

CFeeRate CMinerPolicyEstimator::estimateFee ( int  nBlocksToConfirm)
inline

Can return CFeeRate(0) if we don't have any data for that many blocks back.

nBlocksToConfirm is 1 based.

Definition at line 257 of file txmempool.cpp.

Here is the caller graph for this function:

◆ estimatePriority()

double CMinerPolicyEstimator::estimatePriority ( int  nBlocksToConfirm)
inline

Definition at line 290 of file txmempool.cpp.

Here is the caller graph for this function:

◆ Read()

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

Definition at line 329 of file txmempool.cpp.

Here is the call graph for this function:

◆ seenBlock()

void CMinerPolicyEstimator::seenBlock ( const std::vector< CTxMemPoolEntry > &  entries,
int  nBlockHeight,
const CFeeRate  minRelayFee 
)
inline

Definition at line 196 of file txmempool.cpp.

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

◆ seenTxConfirm()

void CMinerPolicyEstimator::seenTxConfirm ( const CFeeRate feeRate,
const CFeeRate minRelayFee,
double  dPriority,
int  nBlocksAgo 
)
inlineprivate

nBlocksAgo is 0 based, i.e.

transactions that confirmed in the highest seen block are nBlocksAgo == 0, transactions in the block before that are nBlocksAgo == 1 etc.

Definition at line 165 of file txmempool.cpp.

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

◆ Write()

void CMinerPolicyEstimator::Write ( CAutoFile fileout) const
inline

Definition at line 320 of file txmempool.cpp.

Member Data Documentation

◆ history

std::vector<CBlockAverage> CMinerPolicyEstimator::history
private

Records observed averages transactions that confirmed within one block, two blocks, three blocks etc.

Definition at line 155 of file txmempool.cpp.

◆ nBestSeenHeight

int CMinerPolicyEstimator::nBestSeenHeight
private

Definition at line 159 of file txmempool.cpp.

◆ sortedFeeSamples

std::vector<CFeeRate> CMinerPolicyEstimator::sortedFeeSamples
private

Definition at line 156 of file txmempool.cpp.

◆ sortedPrioritySamples

std::vector<double> CMinerPolicyEstimator::sortedPrioritySamples
private

Definition at line 157 of file txmempool.cpp.


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