aboutsummaryrefslogtreecommitdiff
path: root/src/policy/fees.h
diff options
context:
space:
mode:
authorAlex Morcos <morcos@chaincode.com>2017-02-16 16:23:15 -0500
committerAlex Morcos <morcos@chaincode.com>2017-04-10 13:56:50 -0400
commit2332f19bef025c22fab5a96a0cd2d52d22489aa2 (patch)
tree76718006577766a897db35b2b797a103c7474d3e /src/policy/fees.h
parent5ba81e54e0390ec0be7dbc8ebea0c35933442a8a (diff)
downloadbitcoin-2332f19bef025c22fab5a96a0cd2d52d22489aa2.tar.xz
Initialize TxConfirmStats in constructor
and change to storing as a pointer.
Diffstat (limited to 'src/policy/fees.h')
-rw-r--r--src/policy/fees.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/policy/fees.h b/src/policy/fees.h
index d11de81ee3..1a9eb0051e 100644
--- a/src/policy/fees.h
+++ b/src/policy/fees.h
@@ -108,13 +108,13 @@ private:
public:
/**
- * Initialize the data structures. This is called by BlockPolicyEstimator's
+ * Create new TxConfirmStats. This is called by BlockPolicyEstimator's
* constructor with default values.
* @param defaultBuckets contains the upper limits for the bucket boundaries
* @param maxConfirms max number of confirms to track
* @param decay how much to decay the historical moving average per block
*/
- void Initialize(std::vector<double>& defaultBuckets, unsigned int maxConfirms, double decay);
+ TxConfirmStats(const std::vector<double>& defaultBuckets, unsigned int maxConfirms, double decay);
/** Clear the state of the curBlock variables to start counting for the new block */
void ClearCurrent(unsigned int nBlockHeight);
@@ -205,6 +205,7 @@ class CBlockPolicyEstimator
public:
/** Create new BlockPolicyEstimator and initialize stats tracking classes with default values */
CBlockPolicyEstimator();
+ ~CBlockPolicyEstimator();
/** Process all the transactions that have been included in a block */
void processBlock(unsigned int nBlockHeight,
@@ -245,7 +246,7 @@ private:
std::map<uint256, TxStatsInfo> mapMemPoolTxs;
/** Classes to track historical data on transaction confirmations */
- TxConfirmStats feeStats;
+ TxConfirmStats* feeStats;
unsigned int trackedTxs;
unsigned int untrackedTxs;