aboutsummaryrefslogtreecommitdiff
path: root/src/policy/fees.h
diff options
context:
space:
mode:
authorAlex Morcos <morcos@chaincode.com>2017-02-23 15:13:41 -0500
committerAlex Morcos <morcos@chaincode.com>2017-04-20 15:46:15 -0400
commitc0a273f4c8bed50de9fc227d98d90dc5ff755515 (patch)
tree5888822ef9969015299d7f1f9f6a02c5634d2c09 /src/policy/fees.h
parent14c948987f0b5128af4dcf9864cf5fa62977c401 (diff)
Change file format for fee estimates.
Move buckets and bucketMap to be stored as part of overall serialization of estimator. Add some placeholder data so file format is only changed once. Maintain 3 different TxConfirmStats with potential for different decays and scales.
Diffstat (limited to 'src/policy/fees.h')
-rw-r--r--src/policy/fees.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/policy/fees.h b/src/policy/fees.h
index 34f07c7270..7aaba7d7d5 100644
--- a/src/policy/fees.h
+++ b/src/policy/fees.h
@@ -141,10 +141,15 @@ private:
/** Classes to track historical data on transaction confirmations */
TxConfirmStats* feeStats;
+ TxConfirmStats* shortStats;
+ TxConfirmStats* longStats;
unsigned int trackedTxs;
unsigned int untrackedTxs;
+ std::vector<double> buckets; // The upper-bound of the range for the bucket (inclusive)
+ std::map<double, unsigned int> bucketMap; // Map of bucket upper-bound to index into all vectors by bucket
+
mutable CCriticalSection cs_feeEstimator;
/** Process a transaction confirmed in a block*/