Ensure that for a conservative estimate, the DOUBLE_SUCCESS_PCT is also met * at 2 * target for any longer time horizons. */
| 787 | * at 2 * target for any longer time horizons. |
| 788 | */ |
| 789 | double CBlockPolicyEstimator::estimateConservativeFee(unsigned int doubleTarget, EstimationResult *result) const |
| 790 | { |
| 791 | double estimate = -1; |
| 792 | EstimationResult tempResult; |
| 793 | if (doubleTarget <= shortStats->GetMaxConfirms()) { |
| 794 | estimate = feeStats->EstimateMedianVal(doubleTarget, SUFFICIENT_FEETXS, DOUBLE_SUCCESS_PCT, nBestSeenHeight, result); |
| 795 | } |
| 796 | if (doubleTarget <= feeStats->GetMaxConfirms()) { |
| 797 | double longEstimate = longStats->EstimateMedianVal(doubleTarget, SUFFICIENT_FEETXS, DOUBLE_SUCCESS_PCT, nBestSeenHeight, &tempResult); |
| 798 | if (longEstimate > estimate) { |
| 799 | estimate = longEstimate; |
| 800 | if (result) *result = tempResult; |
| 801 | } |
| 802 | } |
| 803 | return estimate; |
| 804 | } |
| 805 | |
| 806 | /** estimateSmartFee returns the max of the feerates calculated with a 60% |
| 807 | * threshold required at target / 2, an 85% threshold required at target and a |
nothing calls this directly
no test coverage detected