Changeset View
Changeset View
Standalone View
Standalone View
src/policy/fees.h
Show First 20 Lines • Show All 215 Lines • ▼ Show 20 Lines | |||||
* block | * block | ||||
*/ | */ | ||||
class CBlockPolicyEstimator { | class CBlockPolicyEstimator { | ||||
public: | public: | ||||
/** | /** | ||||
* Create new BlockPolicyEstimator and initialize stats tracking classes | * Create new BlockPolicyEstimator and initialize stats tracking classes | ||||
* with default values. | * with default values. | ||||
*/ | */ | ||||
CBlockPolicyEstimator(const CFeeRate &minRelayFee); | CBlockPolicyEstimator(); | ||||
/** Process all the transactions that have been included in a block */ | /** Process all the transactions that have been included in a block */ | ||||
void processBlock(unsigned int nBlockHeight, | void processBlock(unsigned int nBlockHeight, | ||||
std::vector<const CTxMemPoolEntry *> &entries); | std::vector<const CTxMemPoolEntry *> &entries); | ||||
/** Process a transaction confirmed in a block*/ | /** Process a transaction confirmed in a block*/ | ||||
bool processBlockTx(unsigned int nBlockHeight, | bool processBlockTx(unsigned int nBlockHeight, | ||||
const CTxMemPoolEntry *entry); | const CTxMemPoolEntry *entry); | ||||
Show All 35 Lines | public: | ||||
/** Write estimation data to a file */ | /** Write estimation data to a file */ | ||||
void Write(CAutoFile &fileout); | void Write(CAutoFile &fileout); | ||||
/** Read estimation data from a file */ | /** Read estimation data from a file */ | ||||
void Read(CAutoFile &filein, int nFileVersion); | void Read(CAutoFile &filein, int nFileVersion); | ||||
private: | private: | ||||
//!< Passed to constructor to avoid dependency on main | //!< Passed to constructor to avoid dependency on main | ||||
CFeeRate minTrackedFee; | |||||
unsigned int nBestSeenHeight; | unsigned int nBestSeenHeight; | ||||
struct TxStatsInfo { | struct TxStatsInfo { | ||||
unsigned int blockHeight; | unsigned int blockHeight; | ||||
unsigned int bucketIndex; | unsigned int bucketIndex; | ||||
TxStatsInfo() : blockHeight(0), bucketIndex(0) {} | TxStatsInfo() : blockHeight(0), bucketIndex(0) {} | ||||
}; | }; | ||||
// map of txids to information about that transaction | // map of txids to information about that transaction | ||||
Show All 22 Lines |