aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorAlex Morcos <morcos@chaincode.com>2016-01-05 13:10:19 -0500
committerWladimir J. van der Laan <laanwj@gmail.com>2016-01-13 11:06:17 +0100
commita36d79bfe247e7fc5c6296fd8603f5094edfe558 (patch)
tree38cbbf772fc86c0d28cfe43b4ed2832a1243b9ba /src/qt
parent8f25d6eb0e0a4c1a369878808fb041283617081c (diff)
downloadbitcoin-a36d79bfe247e7fc5c6296fd8603f5094edfe558.tar.xz
Add sane fallback for fee estimation
- Always respect GetRequiredFee for wallet txs - Add sane fallback for fee estimation - SQUASHME: Fix rpc tests that assumed fallback to minRelayTxFee Add new commandline option "-fallbackfee" to use when fee estimation does not have sufficient data. Github-Pull: #7296 Rebased-From: 995b9f3 e420a1b bebe58b
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/sendcoinsdialog.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 31c9028c4b..c834c3b564 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));
}