mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Call estimate(Smart)Fee directly from CBlockPolicyEstimator
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "validation.h" // mempool and minRelayTxFee
|
||||
#include "ui_interface.h"
|
||||
#include "txmempool.h"
|
||||
#include "policy/fees.h"
|
||||
#include "wallet/wallet.h"
|
||||
|
||||
#include <QFontMetrics>
|
||||
@@ -660,7 +661,7 @@ void SendCoinsDialog::updateSmartFeeLabel()
|
||||
|
||||
int nBlocksToConfirm = ui->sliderSmartFee->maximum() - ui->sliderSmartFee->value() + 2;
|
||||
int estimateFoundAtBlocks = nBlocksToConfirm;
|
||||
CFeeRate feeRate = mempool.estimateSmartFee(nBlocksToConfirm, &estimateFoundAtBlocks);
|
||||
CFeeRate feeRate = ::feeEstimator.estimateSmartFee(nBlocksToConfirm, &estimateFoundAtBlocks, ::mempool);
|
||||
if (feeRate <= CFeeRate(0)) // not enough data => minfee
|
||||
{
|
||||
ui->labelSmartFee->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(),
|
||||
|
||||
Reference in New Issue
Block a user