diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -787,9 +787,7 @@ int nBlocksToConfirm = getConfTargetForIndex(ui->confTargetSelector->currentIndex()); - int estimateFoundAtBlocks = nBlocksToConfirm; - CFeeRate feeRate = - g_mempool.estimateSmartFee(nBlocksToConfirm, &estimateFoundAtBlocks); + CFeeRate feeRate = g_mempool.estimateFee(nBlocksToConfirm); // not enough data => minfee if (feeRate <= CFeeRate(Amount::zero())) { ui->labelSmartFee->setText( @@ -811,7 +809,7 @@ ui->labelSmartFee2->hide(); ui->labelFeeEstimation->setText( tr("Estimated to begin confirmation within %n block(s).", "", - estimateFoundAtBlocks)); + nBlocksToConfirm)); } updateFeeMinimizedLabel(); diff --git a/src/txmempool.h b/src/txmempool.h --- a/src/txmempool.h +++ b/src/txmempool.h @@ -743,15 +743,6 @@ TxMempoolInfo info(const uint256 &hash) const; std::vector infoAll() const; - /** - * Estimate fee rate needed to get into the next nBlocks. If no answer can - * be given at nBlocks, return an estimate at the lowest number of blocks - * where one can be given. - */ - CFeeRate estimateSmartFee(int nBlocks, - int *answerFoundAtBlocks = nullptr) const; - - /** Estimate fee rate needed to get into the next nBlocks */ CFeeRate estimateFee(int nBlocks) const; size_t DynamicMemoryUsage() const; diff --git a/src/txmempool.cpp b/src/txmempool.cpp --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -962,16 +962,6 @@ return std::max(GetConfig().GetMinFeePerKB(), GetMinFee(maxMempoolSize)); } -CFeeRate CTxMemPool::estimateSmartFee(int nBlocks, - int *answerFoundAtBlocks) const { - if (answerFoundAtBlocks != nullptr) { - *answerFoundAtBlocks = 1; - } - // estimateSmartFee already includes the GetMinFee check, this is the - // reason it takes `*this`. It does not need std::max as above. - return estimateFee(nBlocks); -} - void CTxMemPool::PrioritiseTransaction(const uint256 hash, const std::string strHash, double dPriorityDelta, diff --git a/src/wallet/fees.cpp b/src/wallet/fees.cpp --- a/src/wallet/fees.cpp +++ b/src/wallet/fees.cpp @@ -18,9 +18,7 @@ Amount nFeeNeeded = targetFee; // User didn't set: use -txconfirmtarget to estimate... if (nFeeNeeded == Amount::zero()) { - int estimateFoundTarget = nConfirmTarget; - nFeeNeeded = pool.estimateSmartFee(nConfirmTarget, &estimateFoundTarget) - .GetFeeCeiling(nTxBytes); + nFeeNeeded = pool.estimateFee(nConfirmTarget).GetFeeCeiling(nTxBytes); // ... unless we don't have enough mempool data for estimatefee, then // use fallbackFee. if (nFeeNeeded == Amount::zero()) { @@ -45,4 +43,4 @@ // payTxFee is the user-set global for desired feerate. return GetMinimumFee(nTxBytes, nConfirmTarget, pool, payTxFee.GetFeeCeiling(nTxBytes)); -} \ No newline at end of file +}