|
|
@ -684,7 +684,7 @@ CFeeRate CBlockPolicyEstimator::estimateRawFee(int confTarget, double successThr |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
default: { |
|
|
|
default: { |
|
|
|
return CFeeRate(0); |
|
|
|
throw std::out_of_range("CBlockPoicyEstimator::estimateRawFee unknown FeeEstimateHorizon"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -703,6 +703,24 @@ CFeeRate CBlockPolicyEstimator::estimateRawFee(int confTarget, double successThr |
|
|
|
return CFeeRate(median); |
|
|
|
return CFeeRate(median); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int CBlockPolicyEstimator::HighestTargetTracked(FeeEstimateHorizon horizon) const |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
switch (horizon) { |
|
|
|
|
|
|
|
case FeeEstimateHorizon::SHORT_HALFLIFE: { |
|
|
|
|
|
|
|
return shortStats->GetMaxConfirms(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case FeeEstimateHorizon::MED_HALFLIFE: { |
|
|
|
|
|
|
|
return feeStats->GetMaxConfirms(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case FeeEstimateHorizon::LONG_HALFLIFE: { |
|
|
|
|
|
|
|
return longStats->GetMaxConfirms(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
default: { |
|
|
|
|
|
|
|
throw std::out_of_range("CBlockPoicyEstimator::HighestTargetTracked unknown FeeEstimateHorizon"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
unsigned int CBlockPolicyEstimator::BlockSpan() const |
|
|
|
unsigned int CBlockPolicyEstimator::BlockSpan() const |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (firstRecordedHeight == 0) return 0; |
|
|
|
if (firstRecordedHeight == 0) return 0; |
|
|
|