diff options
| author | Alex Morcos <[email protected]> | 2016-01-05 13:11:34 -0500 |
|---|---|---|
| committer | Alex Morcos <[email protected]> | 2016-01-05 13:13:23 -0500 |
| commit | e420a1b15e3be8c9d862173d9d554563405b34a7 (patch) | |
| tree | 13af0732d92b76ab8279d9632b797f3ce3ec7aa9 /src/qt/sendcoinsdialog.cpp | |
| parent | Always respect GetRequiredFee for wallet txs (diff) | |
| download | discoin-e420a1b15e3be8c9d862173d9d554563405b34a7.tar.xz discoin-e420a1b15e3be8c9d862173d9d554563405b34a7.zip | |
Add sane fallback for fee estimation
Add new commandline option "-fallbackfee" to use when fee estimation does not have sufficient data.
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
| -rw-r--r-- | src/qt/sendcoinsdialog.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 31c9028c4..c834c3b56 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -640,13 +640,15 @@ void SendCoinsDialog::updateSmartFeeLabel() 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"); + ui->labelSmartFee->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), + std::max(CWallet::fallbackFee.GetFeePerK(), CWallet::GetRequiredFee(1000))) + "/kB"); ui->labelSmartFee2->show(); // (Smart fee not initialized yet. This usually takes a few blocks...) ui->labelFeeEstimation->setText(""); } else { - ui->labelSmartFee->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), feeRate.GetFeePerK()) + "/kB"); + ui->labelSmartFee->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), + std::max(feeRate.GetFeePerK(), CWallet::GetRequiredFee(1000))) + "/kB"); ui->labelSmartFee2->hide(); ui->labelFeeEstimation->setText(tr("Estimated to begin confirmation within %n block(s).", "", estimateFoundAtBlocks)); } |