MCPcopy Create free account
hub / github.com/ElementsProject/elements / estimateConservativeFee

Method estimateConservativeFee

src/policy/fees.cpp:789–804  ·  view source on GitHub ↗

Ensure that for a conservative estimate, the DOUBLE_SUCCESS_PCT is also met * at 2 * target for any longer time horizons. */

Source from the content-addressed store, hash-verified

787 * at 2 * target for any longer time horizons.
788 */
789double 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

Callers

nothing calls this directly

Calls 2

GetMaxConfirmsMethod · 0.80
EstimateMedianValMethod · 0.80

Tested by

no test coverage detected