Skip to content

Commit 091a9ae

Browse files
committed
remove minimum total fee option
1 parent 94e5227 commit 091a9ae

File tree

5 files changed

+1
-46
lines changed

5 files changed

+1
-46
lines changed

src/qt/coincontroldialog.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,6 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
513513

514514
// Fee
515515
nPayFee = CWallet::GetMinimumFee(nBytes, nTxConfirmTarget, ::mempool, ::feeEstimator);
516-
if (nPayFee > 0 && coinControl->nMinimumTotalFee > nPayFee)
517-
nPayFee = coinControl->nMinimumTotalFee;
518516

519517
if (nPayAmount > 0)
520518
{
@@ -573,7 +571,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
573571
l5->setText(((nBytes > 0) ? ASYMP_UTF8 : "") + QString::number(nBytes)); // Bytes
574572
l7->setText(fDust ? tr("yes") : tr("no")); // Dust
575573
l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); // Change
576-
if (nPayFee > 0 && (coinControl->nMinimumTotalFee < nPayFee))
574+
if (nPayFee > 0)
577575
{
578576
l3->setText(ASYMP_UTF8 + l3->text());
579577
l4->setText(ASYMP_UTF8 + l4->text());

src/qt/forms/sendcoinsdialog.ui

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -861,19 +861,6 @@
861861
</attribute>
862862
</widget>
863863
</item>
864-
<item>
865-
<widget class="QRadioButton" name="radioCustomAtLeast">
866-
<property name="toolTip">
867-
<string>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 satoshis in fee, while &quot;total at least&quot; pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</string>
868-
</property>
869-
<property name="text">
870-
<string>total at least</string>
871-
</property>
872-
<attribute name="buttonGroup">
873-
<string notr="true">groupCustomFee</string>
874-
</attribute>
875-
</widget>
876-
</item>
877864
<item>
878865
<widget class="BitcoinAmountField" name="customFee"/>
879866
</item>

src/qt/sendcoinsdialog.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p
111111
ui->groupFee->setId(ui->radioCustomFee, 1);
112112
ui->groupFee->button((int)std::max(0, std::min(1, settings.value("nFeeRadio").toInt())))->setChecked(true);
113113
ui->groupCustomFee->setId(ui->radioCustomPerKilobyte, 0);
114-
ui->groupCustomFee->setId(ui->radioCustomAtLeast, 1);
115114
ui->groupCustomFee->button((int)std::max(0, std::min(1, settings.value("nCustomFeeRadio").toInt())))->setChecked(true);
116115
ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
117116
ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
@@ -608,7 +607,6 @@ void SendCoinsDialog::updateFeeSectionControls()
608607
ui->checkBoxMinimumFee ->setEnabled(ui->radioCustomFee->isChecked());
609608
ui->labelMinFeeWarning ->setEnabled(ui->radioCustomFee->isChecked());
610609
ui->radioCustomPerKilobyte ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
611-
ui->radioCustomAtLeast ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked() && CoinControlDialog::coinControl->HasSelected());
612610
ui->customFee ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
613611
}
614612

@@ -619,19 +617,12 @@ void SendCoinsDialog::updateGlobalFeeVariables()
619617
int nConfirmTarget = ui->sliderSmartFee->maximum() - ui->sliderSmartFee->value() + 2;
620618
payTxFee = CFeeRate(0);
621619

622-
// set nMinimumTotalFee to 0 to not accidentally pay a custom fee
623-
CoinControlDialog::coinControl->nMinimumTotalFee = 0;
624-
625620
// show the estimated required time for confirmation
626621
ui->confirmationTargetLabel->setText(GUIUtil::formatDurationStr(nConfirmTarget * Params().GetConsensus().nPowTargetSpacing) + " / " + tr("%n block(s)", "", nConfirmTarget));
627622
}
628623
else
629624
{
630625
payTxFee = CFeeRate(ui->customFee->value());
631-
632-
// if user has selected to set a minimum absolute fee, pass the value to coincontrol
633-
// set nMinimumTotalFee to 0 in case of user has selected that the fee is per KB
634-
CoinControlDialog::coinControl->nMinimumTotalFee = ui->radioCustomAtLeast->isChecked() ? ui->customFee->value() : 0;
635626
}
636627
}
637628

@@ -830,21 +821,6 @@ void SendCoinsDialog::coinControlUpdateLabels()
830821
if (!model || !model->getOptionsModel())
831822
return;
832823

833-
if (model->getOptionsModel()->getCoinControlFeatures())
834-
{
835-
// enable minimum absolute fee UI controls
836-
ui->radioCustomAtLeast->setVisible(true);
837-
838-
// only enable the feature if inputs are selected
839-
ui->radioCustomAtLeast->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked() &&CoinControlDialog::coinControl->HasSelected());
840-
}
841-
else
842-
{
843-
// in case coin control is disabled (=default), hide minimum absolute fee UI controls
844-
ui->radioCustomAtLeast->setVisible(false);
845-
return;
846-
}
847-
848824
// set pay amounts
849825
CoinControlDialog::payAmounts.clear();
850826
CoinControlDialog::fSubtractFeeFromAmount = false;

src/wallet/coincontrol.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ class CCoinControl
1818
bool fAllowOtherInputs;
1919
//! Includes watch only addresses which match the ISMINE_WATCH_SOLVABLE criteria
2020
bool fAllowWatchOnly;
21-
//! Minimum absolute fee (not per kilobyte)
22-
CAmount nMinimumTotalFee;
2321
//! Override estimated feerate
2422
bool fOverrideFeeRate;
2523
//! Feerate to use if overrideFeeRate is true
@@ -40,7 +38,6 @@ class CCoinControl
4038
fAllowOtherInputs = false;
4139
fAllowWatchOnly = false;
4240
setSelected.clear();
43-
nMinimumTotalFee = 0;
4441
nFeeRate = CFeeRate(0);
4542
fOverrideFeeRate = false;
4643
nConfirmTarget = 0;

src/wallet/wallet.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2599,9 +2599,6 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT
25992599
currentConfirmationTarget = coinControl->nConfirmTarget;
26002600

26012601
CAmount nFeeNeeded = GetMinimumFee(nBytes, currentConfirmationTarget, ::mempool, ::feeEstimator);
2602-
if (coinControl && nFeeNeeded > 0 && coinControl->nMinimumTotalFee > nFeeNeeded) {
2603-
nFeeNeeded = coinControl->nMinimumTotalFee;
2604-
}
26052602
if (coinControl && coinControl->fOverrideFeeRate)
26062603
nFeeNeeded = coinControl->nFeeRate.GetFee(nBytes);
26072604

0 commit comments

Comments
 (0)