Skip to content

Commit 5cbbbd7

Browse files
committed
[Wallet] Use RBF by default in QT only
GUI wallet uses RBF by default, regardless of -walletrbf. RPC and debug console in the GUI remain unchanged; they don't use RBF by default, unless launched with -walletrbf=1.
1 parent 91eeaa0 commit 5cbbbd7

File tree

6 files changed

+19
-16
lines changed

6 files changed

+19
-16
lines changed

doc/release-notes.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ Due to a backward-incompatible change in the wallet database, wallets created
6767
with version 0.16.0 will be rejected by previous versions. Also, version 0.16.0
6868
will only create hierarchical deterministic (HD) wallets.
6969

70+
Replace-By-Fee by default in GUI
71+
--------------------------------
72+
The send screen now uses BIP-125 RBF by default, regardless of `-walletrbf`.
73+
There is a checkbox to mark the transaction as final.
74+
75+
The RPC default remains unchanged: to use RBF, launch with `-walletrbf=1` or
76+
use the `replaceable` argument for individual transactions.
77+
7078
Custom wallet directories
7179
---------------------
7280
The ability to specify a directory other than the default data directory in which to store

src/qt/forms/sendcoinsdialog.ui

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,10 +1108,10 @@
11081108
<item>
11091109
<widget class="QCheckBox" name="optInRBF">
11101110
<property name="text">
1111-
<string>Allow increasing fee</string>
1111+
<string>Enable Replace-By-Fee</string>
11121112
</property>
11131113
<property name="toolTip">
1114-
<string>This allows you to increase the fee later if the transaction takes a long time to confirm. This will also cause the recommended fee to be lower. ("Replace-By-Fee", BIP 125)</string>
1114+
<string>With Replace-By-Fee (BIP-125) you can increase a transaction's fee after it is sent. Without this, a higher fee may be recommended to compensate for increased transaction delay risk.</string>
11151115
</property>
11161116
</widget>
11171117
</item>

src/qt/sendcoinsdialog.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ void SendCoinsDialog::setModel(WalletModel *_model)
184184
updateSmartFeeLabel();
185185

186186
// set default rbf checkbox state
187-
ui->optInRBF->setCheckState(model->getDefaultWalletRbf() ? Qt::Checked : Qt::Unchecked);
187+
ui->optInRBF->setCheckState(Qt::Checked);
188188

189189
// set the smartfee-sliders default value (wallets default conf.target or last stored value)
190190
QSettings settings;
@@ -342,12 +342,14 @@ void SendCoinsDialog::on_sendButton_clicked()
342342
questionString.append(QString("<span style='font-size:10pt;font-weight:normal;'><br />(=%2)</span>")
343343
.arg(alternativeUnits.join(" " + tr("or") + "<br />")));
344344

345-
if (ui->optInRBF->isChecked())
346-
{
347-
questionString.append("<hr /><span>");
348-
questionString.append(tr("You can increase the fee later (signals Replace-By-Fee)."));
349-
questionString.append("</span>");
345+
questionString.append("<hr /><span>");
346+
if (ui->optInRBF->isChecked()) {
347+
questionString.append(tr("You can increase the fee later (signals Replace-By-Fee, BIP-125)."));
348+
} else {
349+
questionString.append(tr("Not signalling Replace-By-Fee, BIP-125."));
350350
}
351+
questionString.append("</span>");
352+
351353

352354
SendConfirmationDialog confirmationDialog(tr("Confirm send coins"),
353355
questionString.arg(formatted.join("<br />")), SEND_CONFIRM_DELAY, this);

src/qt/walletmodel.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -737,8 +737,3 @@ int WalletModel::getDefaultConfirmTarget() const
737737
{
738738
return nTxConfirmTarget;
739739
}
740-
741-
bool WalletModel::getDefaultWalletRbf() const
742-
{
743-
return fWalletRbf;
744-
}

src/qt/walletmodel.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,6 @@ class WalletModel : public QObject
216216

217217
int getDefaultConfirmTarget() const;
218218

219-
bool getDefaultWalletRbf() const;
220-
221219
private:
222220
CWallet *wallet;
223221
bool fHaveWatchOnly;

src/wallet/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ std::string GetWalletHelpString(bool showDebug)
3131
strUsage += HelpMessageOpt("-salvagewallet", _("Attempt to recover private keys from a corrupt wallet on startup"));
3232
strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), DEFAULT_SPEND_ZEROCONF_CHANGE));
3333
strUsage += HelpMessageOpt("-txconfirmtarget=<n>", strprintf(_("If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)"), DEFAULT_TX_CONFIRM_TARGET));
34-
strUsage += HelpMessageOpt("-walletrbf", strprintf(_("Send transactions with full-RBF opt-in enabled (default: %u)"), DEFAULT_WALLET_RBF));
34+
strUsage += HelpMessageOpt("-walletrbf", strprintf(_("Send transactions with full-RBF opt-in enabled (RPC only, default: %u)"), DEFAULT_WALLET_RBF));
3535
strUsage += HelpMessageOpt("-upgradewallet", _("Upgrade wallet to latest format on startup"));
3636
strUsage += HelpMessageOpt("-wallet=<file>", _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), DEFAULT_WALLET_DAT));
3737
strUsage += HelpMessageOpt("-walletbroadcast", _("Make the wallet broadcast transactions") + " " + strprintf(_("(default: %u)"), DEFAULT_WALLETBROADCAST));

0 commit comments

Comments
 (0)