mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Merge pull request #6134
e304432Pass reference to estimateSmartFee and cleanup whitespace (Suhas Daftuar)56106a3Expose RPC calls for estimatesmart functions (Alex Morcos)e93a236add estimateSmartFee to the unit test (Alex Morcos)6303051EstimateSmart functions consider mempool min fee (Alex Morcos)f22ac4aIncrease success threshold for fee estimation to 95% (Alex Morcos)4fe2823Change wallet and GUI code to use new smart fee estimation calls. (Alex Morcos)22eca7dAdd smart fee estimation functions (Alex Morcos)
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