mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Change wallet and GUI code to use new smart fee estimation calls.
This commit is contained in:
@@ -633,7 +633,8 @@ void SendCoinsDialog::updateSmartFeeLabel()
|
||||
return;
|
||||
|
||||
int nBlocksToConfirm = defaultConfirmTarget - ui->sliderSmartFee->value();
|
||||
CFeeRate feeRate = mempool.estimateFee(nBlocksToConfirm);
|
||||
int estimateFoundAtBlocks = nBlocksToConfirm;
|
||||
CFeeRate feeRate = mempool.estimateSmartFee(nBlocksToConfirm, &estimateFoundAtBlocks);
|
||||
if (feeRate <= CFeeRate(0)) // not enough data => minfee
|
||||
{
|
||||
ui->labelSmartFee->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), CWallet::GetRequiredFee(1000)) + "/kB");
|
||||
@@ -644,7 +645,7 @@ void SendCoinsDialog::updateSmartFeeLabel()
|
||||
{
|
||||
ui->labelSmartFee->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), feeRate.GetFeePerK()) + "/kB");
|
||||
ui->labelSmartFee2->hide();
|
||||
ui->labelFeeEstimation->setText(tr("Estimated to begin confirmation within %n block(s).", "", nBlocksToConfirm));
|
||||
ui->labelFeeEstimation->setText(tr("Estimated to begin confirmation within %n block(s).", "", estimateFoundAtBlocks));
|
||||
}
|
||||
|
||||
updateFeeMinimizedLabel();
|
||||
|
||||
Reference in New Issue
Block a user