From 2d2e17052c389948c511d2b5d41c4cc243cdc145 Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Wed, 12 Apr 2017 12:29:03 -0400 Subject: Comments and improved documentation --- src/policy/fees.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/policy/fees.cpp') diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp index 97e953686..35e285739 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) -- cgit v1.2.3