aboutsummaryrefslogtreecommitdiff
path: root/src/policy/fees.cpp
diff options
context:
space:
mode:
authorAlex Morcos <morcos@chaincode.com>2017-04-12 12:29:03 -0400
committerAlex Morcos <morcos@chaincode.com>2017-05-10 11:48:46 -0400
commit2d2e17052c389948c511d2b5d41c4cc243cdc145 (patch)
tree42818bf17591732fe5bf1d65be22ded212a47e29 /src/policy/fees.cpp
parentef589f8d40d926bbc78a556a149c367cf634c376 (diff)
Comments and improved documentation
Diffstat (limited to 'src/policy/fees.cpp')
-rw-r--r--src/policy/fees.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp
index 97e9536867..35e2857399 100644
--- a/src/policy/fees.cpp
+++ b/src/policy/fees.cpp
@@ -729,6 +729,9 @@ double CBlockPolicyEstimator::estimateCombinedFee(unsigned int confTarget, doubl
return estimate;
}
+/** Ensure that for a conservative estimate, the DOUBLE_SUCCESS_PCT is also met
+ * at 2 * target for any longer time horizons.
+ */
double CBlockPolicyEstimator::estimateConservativeFee(unsigned int doubleTarget) const
{
double estimate = -1;
@@ -744,6 +747,13 @@ double CBlockPolicyEstimator::estimateConservativeFee(unsigned int doubleTarget)
return estimate;
}
+/** estimateSmartFee returns the max of the feerates calculated with a 60%
+ * threshold required at target / 2, an 85% threshold required at target and a
+ * 95% threshold required at 2 * target. Each calculation is performed at the
+ * shortest time horizon which tracks the required target. Conservative
+ * estimates, however, required the 95% threshold at 2 * target be met for any
+ * longer time horizons also.
+ */
CFeeRate CBlockPolicyEstimator::estimateSmartFee(int confTarget, int *answerFoundAtTarget, const CTxMemPool& pool, bool conservative) const
{
if (answerFoundAtTarget)