Skip to content

Commit e477516

Browse files
committed
Merge #10390: [wallet] remove minimum total fee option
091a9ae remove minimum total fee option (Gregory Sanders) Tree-SHA512: 9be4df3dab0219f30917211408f47b242f7c96dd7663b06ab1cf3cc63027f14956dc680883be6c58673b6452d0f339cf893694e4f21d0d248e70760614d5a344
2 parents 217b416 + 091a9ae commit e477516

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
@@ -109,7 +109,6 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p
109109
ui->groupFee->setId(ui->radioCustomFee, 1);
110110
ui->groupFee->button((int)std::max(0, std::min(1, settings.value("nFeeRadio").toInt())))->setChecked(true);
111111
ui->groupCustomFee->setId(ui->radioCustomPerKilobyte, 0);
112-
ui->groupCustomFee->setId(ui->radioCustomAtLeast, 1);
113112
ui->groupCustomFee->button((int)std::max(0, std::min(1, settings.value("nCustomFeeRadio").toInt())))->setChecked(true);
114113
ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
115114
ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
@@ -606,7 +605,6 @@ void SendCoinsDialog::updateFeeSectionControls()
606605
ui->checkBoxMinimumFee ->setEnabled(ui->radioCustomFee->isChecked());
607606
ui->labelMinFeeWarning ->setEnabled(ui->radioCustomFee->isChecked());
608607
ui->radioCustomPerKilobyte ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
609-
ui->radioCustomAtLeast ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked() && CoinControlDialog::coinControl->HasSelected());
610608
ui->customFee ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
611609
}
612610

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

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

@@ -828,21 +819,6 @@ void SendCoinsDialog::coinControlUpdateLabels()
828819
if (!model || !model->getOptionsModel())
829820
return;
830821

831-
if (model->getOptionsModel()->getCoinControlFeatures())
832-
{
833-
// enable minimum absolute fee UI controls
834-
ui->radioCustomAtLeast->setVisible(true);
835-
836-
// only enable the feature if inputs are selected
837-
ui->radioCustomAtLeast->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked() &&CoinControlDialog::coinControl->HasSelected());
838-
}
839-
else
840-
{
841-
// in case coin control is disabled (=default), hide minimum absolute fee UI controls
842-
ui->radioCustomAtLeast->setVisible(false);
843-
return;
844-
}
845-
846822
// set pay amounts
847823
CoinControlDialog::payAmounts.clear();
848824
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
@@ -2635,9 +2635,6 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT
26352635
currentConfirmationTarget = coinControl->nConfirmTarget;
26362636

26372637
CAmount nFeeNeeded = GetMinimumFee(nBytes, currentConfirmationTarget, ::mempool, ::feeEstimator);
2638-
if (coinControl && nFeeNeeded > 0 && coinControl->nMinimumTotalFee > nFeeNeeded) {
2639-
nFeeNeeded = coinControl->nMinimumTotalFee;
2640-
}
26412638
if (coinControl && coinControl->fOverrideFeeRate)
26422639
nFeeNeeded = coinControl->nFeeRate.GetFee(nBytes);
26432640

0 commit comments

Comments
 (0)