mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-27 16:05:39 +01:00
Call estimate(Smart)Fee directly from CBlockPolicyEstimator
This commit is contained in:
@@ -77,7 +77,7 @@ void TxConfirmStats::UpdateMovingAverages()
|
||||
// returns -1 on error conditions
|
||||
double TxConfirmStats::EstimateMedianVal(int confTarget, double sufficientTxVal,
|
||||
double successBreakPoint, bool requireGreater,
|
||||
unsigned int nBlockHeight)
|
||||
unsigned int nBlockHeight) const
|
||||
{
|
||||
// Counters for a bucket (or range of buckets)
|
||||
double nConf = 0; // Number of tx's confirmed within the confTarget
|
||||
@@ -411,7 +411,7 @@ void CBlockPolicyEstimator::processBlock(unsigned int nBlockHeight,
|
||||
untrackedTxs = 0;
|
||||
}
|
||||
|
||||
CFeeRate CBlockPolicyEstimator::estimateFee(int confTarget)
|
||||
CFeeRate CBlockPolicyEstimator::estimateFee(int confTarget) const
|
||||
{
|
||||
LOCK(cs_feeEstimator);
|
||||
// Return failure if trying to analyze a target we're not tracking
|
||||
@@ -427,7 +427,7 @@ CFeeRate CBlockPolicyEstimator::estimateFee(int confTarget)
|
||||
return CFeeRate(median);
|
||||
}
|
||||
|
||||
CFeeRate CBlockPolicyEstimator::estimateSmartFee(int confTarget, int *answerFoundAtTarget, const CTxMemPool& pool)
|
||||
CFeeRate CBlockPolicyEstimator::estimateSmartFee(int confTarget, int *answerFoundAtTarget, const CTxMemPool& pool) const
|
||||
{
|
||||
if (answerFoundAtTarget)
|
||||
*answerFoundAtTarget = confTarget;
|
||||
|
||||
Reference in New Issue
Block a user