[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.
This commit is contained in:
parent
91eeaa0335
commit
5cbbbd7143
6 changed files with 19 additions and 16 deletions
|
@ -67,6 +67,14 @@ Due to a backward-incompatible change in the wallet database, wallets created
|
||||||
with version 0.16.0 will be rejected by previous versions. Also, version 0.16.0
|
with version 0.16.0 will be rejected by previous versions. Also, version 0.16.0
|
||||||
will only create hierarchical deterministic (HD) wallets.
|
will only create hierarchical deterministic (HD) wallets.
|
||||||
|
|
||||||
|
Replace-By-Fee by default in GUI
|
||||||
|
--------------------------------
|
||||||
|
The send screen now uses BIP-125 RBF by default, regardless of `-walletrbf`.
|
||||||
|
There is a checkbox to mark the transaction as final.
|
||||||
|
|
||||||
|
The RPC default remains unchanged: to use RBF, launch with `-walletrbf=1` or
|
||||||
|
use the `replaceable` argument for individual transactions.
|
||||||
|
|
||||||
Custom wallet directories
|
Custom wallet directories
|
||||||
---------------------
|
---------------------
|
||||||
The ability to specify a directory other than the default data directory in which to store
|
The ability to specify a directory other than the default data directory in which to store
|
||||||
|
|
|
@ -1108,10 +1108,10 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="optInRBF">
|
<widget class="QCheckBox" name="optInRBF">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Allow increasing fee</string>
|
<string>Enable Replace-By-Fee</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<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>
|
<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>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -184,7 +184,7 @@ void SendCoinsDialog::setModel(WalletModel *_model)
|
||||||
updateSmartFeeLabel();
|
updateSmartFeeLabel();
|
||||||
|
|
||||||
// set default rbf checkbox state
|
// set default rbf checkbox state
|
||||||
ui->optInRBF->setCheckState(model->getDefaultWalletRbf() ? Qt::Checked : Qt::Unchecked);
|
ui->optInRBF->setCheckState(Qt::Checked);
|
||||||
|
|
||||||
// set the smartfee-sliders default value (wallets default conf.target or last stored value)
|
// set the smartfee-sliders default value (wallets default conf.target or last stored value)
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
@ -342,12 +342,14 @@ void SendCoinsDialog::on_sendButton_clicked()
|
||||||
questionString.append(QString("<span style='font-size:10pt;font-weight:normal;'><br />(=%2)</span>")
|
questionString.append(QString("<span style='font-size:10pt;font-weight:normal;'><br />(=%2)</span>")
|
||||||
.arg(alternativeUnits.join(" " + tr("or") + "<br />")));
|
.arg(alternativeUnits.join(" " + tr("or") + "<br />")));
|
||||||
|
|
||||||
if (ui->optInRBF->isChecked())
|
questionString.append("<hr /><span>");
|
||||||
{
|
if (ui->optInRBF->isChecked()) {
|
||||||
questionString.append("<hr /><span>");
|
questionString.append(tr("You can increase the fee later (signals Replace-By-Fee, BIP-125)."));
|
||||||
questionString.append(tr("You can increase the fee later (signals Replace-By-Fee)."));
|
} else {
|
||||||
questionString.append("</span>");
|
questionString.append(tr("Not signalling Replace-By-Fee, BIP-125."));
|
||||||
}
|
}
|
||||||
|
questionString.append("</span>");
|
||||||
|
|
||||||
|
|
||||||
SendConfirmationDialog confirmationDialog(tr("Confirm send coins"),
|
SendConfirmationDialog confirmationDialog(tr("Confirm send coins"),
|
||||||
questionString.arg(formatted.join("<br />")), SEND_CONFIRM_DELAY, this);
|
questionString.arg(formatted.join("<br />")), SEND_CONFIRM_DELAY, this);
|
||||||
|
|
|
@ -737,8 +737,3 @@ int WalletModel::getDefaultConfirmTarget() const
|
||||||
{
|
{
|
||||||
return nTxConfirmTarget;
|
return nTxConfirmTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WalletModel::getDefaultWalletRbf() const
|
|
||||||
{
|
|
||||||
return fWalletRbf;
|
|
||||||
}
|
|
||||||
|
|
|
@ -216,8 +216,6 @@ public:
|
||||||
|
|
||||||
int getDefaultConfirmTarget() const;
|
int getDefaultConfirmTarget() const;
|
||||||
|
|
||||||
bool getDefaultWalletRbf() const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CWallet *wallet;
|
CWallet *wallet;
|
||||||
bool fHaveWatchOnly;
|
bool fHaveWatchOnly;
|
||||||
|
|
|
@ -31,7 +31,7 @@ std::string GetWalletHelpString(bool showDebug)
|
||||||
strUsage += HelpMessageOpt("-salvagewallet", _("Attempt to recover private keys from a corrupt wallet on startup"));
|
strUsage += HelpMessageOpt("-salvagewallet", _("Attempt to recover private keys from a corrupt wallet on startup"));
|
||||||
strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), DEFAULT_SPEND_ZEROCONF_CHANGE));
|
strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), DEFAULT_SPEND_ZEROCONF_CHANGE));
|
||||||
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));
|
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));
|
||||||
strUsage += HelpMessageOpt("-walletrbf", strprintf(_("Send transactions with full-RBF opt-in enabled (default: %u)"), DEFAULT_WALLET_RBF));
|
strUsage += HelpMessageOpt("-walletrbf", strprintf(_("Send transactions with full-RBF opt-in enabled (RPC only, default: %u)"), DEFAULT_WALLET_RBF));
|
||||||
strUsage += HelpMessageOpt("-upgradewallet", _("Upgrade wallet to latest format on startup"));
|
strUsage += HelpMessageOpt("-upgradewallet", _("Upgrade wallet to latest format on startup"));
|
||||||
strUsage += HelpMessageOpt("-wallet=<file>", _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), DEFAULT_WALLET_DAT));
|
strUsage += HelpMessageOpt("-wallet=<file>", _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), DEFAULT_WALLET_DAT));
|
||||||
strUsage += HelpMessageOpt("-walletbroadcast", _("Make the wallet broadcast transactions") + " " + strprintf(_("(default: %u)"), DEFAULT_WALLETBROADCAST));
|
strUsage += HelpMessageOpt("-walletbroadcast", _("Make the wallet broadcast transactions") + " " + strprintf(_("(default: %u)"), DEFAULT_WALLETBROADCAST));
|
||||||
|
|
Loading…
Reference in a new issue