mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-28 13:02:38 +02:00
Qt/Options: Configure walletrbf using rwconf
This commit is contained in:
parent
b2645bf424
commit
7a31573d08
@ -188,6 +188,14 @@ OptionsDialog::OptionsDialog(QWidget* parent, bool enableWallet)
|
|||||||
ui->maxuploadtarget->setMaximum(std::numeric_limits<int>::max());
|
ui->maxuploadtarget->setMaximum(std::numeric_limits<int>::max());
|
||||||
connect(ui->maxuploadtargetCheckbox, SIGNAL(toggled(bool)), ui->maxuploadtarget, SLOT(setEnabled(bool)));
|
connect(ui->maxuploadtargetCheckbox, SIGNAL(toggled(bool)), ui->maxuploadtarget, SLOT(setEnabled(bool)));
|
||||||
|
|
||||||
|
prevwidget = ui->tabWidget;
|
||||||
|
|
||||||
|
walletrbf = new QCheckBox(ui->tabWallet);
|
||||||
|
walletrbf->setText(tr("Request Replace-By-Fee"));
|
||||||
|
walletrbf->setToolTip(tr("Indicates that the sender may wish to replace this transaction with a new one paying higher fees (prior to being confirmed). Can be overridden per send."));
|
||||||
|
ui->verticalLayout_Wallet->insertWidget(0, walletrbf);
|
||||||
|
FixTabOrder(walletrbf);
|
||||||
|
|
||||||
prevwidget = ui->peerbloomfilters;
|
prevwidget = ui->peerbloomfilters;
|
||||||
|
|
||||||
/* Mempool tab */
|
/* Mempool tab */
|
||||||
@ -490,6 +498,7 @@ void OptionsDialog::setMapper()
|
|||||||
mapper->addMapping(ui->pruneSizeMiB, OptionsModel::PruneSizeMiB);
|
mapper->addMapping(ui->pruneSizeMiB, OptionsModel::PruneSizeMiB);
|
||||||
|
|
||||||
/* Wallet */
|
/* Wallet */
|
||||||
|
mapper->addMapping(walletrbf, OptionsModel::walletrbf);
|
||||||
mapper->addMapping(ui->addressType, OptionsModel::addresstype);
|
mapper->addMapping(ui->addressType, OptionsModel::addresstype);
|
||||||
mapper->addMapping(ui->spendZeroConfChange, OptionsModel::SpendZeroConfChange);
|
mapper->addMapping(ui->spendZeroConfChange, OptionsModel::SpendZeroConfChange);
|
||||||
mapper->addMapping(ui->coinControlFeatures, OptionsModel::CoinControlFeatures);
|
mapper->addMapping(ui->coinControlFeatures, OptionsModel::CoinControlFeatures);
|
||||||
|
@ -94,6 +94,8 @@ private:
|
|||||||
void FixTabOrder(QWidget *);
|
void FixTabOrder(QWidget *);
|
||||||
void CreateOptionUI(QBoxLayout *, QWidget *, const QString& text);
|
void CreateOptionUI(QBoxLayout *, QWidget *, const QString& text);
|
||||||
|
|
||||||
|
QCheckBox *walletrbf;
|
||||||
|
|
||||||
QValueComboBox *mempoolreplacement;
|
QValueComboBox *mempoolreplacement;
|
||||||
QSpinBox *maxorphantx;
|
QSpinBox *maxorphantx;
|
||||||
QSpinBox *maxmempool;
|
QSpinBox *maxmempool;
|
||||||
|
@ -586,6 +586,10 @@ QVariant OptionsModel::getOption(OptionID option, const std::string& suffix) con
|
|||||||
return QVariant::fromValue(m_font_qrcodes);
|
return QVariant::fromValue(m_font_qrcodes);
|
||||||
case PeersTabAlternatingRowColors:
|
case PeersTabAlternatingRowColors:
|
||||||
return m_peers_tab_alternating_row_colors;
|
return m_peers_tab_alternating_row_colors;
|
||||||
|
#ifdef ENABLE_WALLET
|
||||||
|
case walletrbf:
|
||||||
|
return gArgs.GetBoolArg("-walletrbf", wallet::DEFAULT_WALLET_RBF);
|
||||||
|
#endif
|
||||||
case CoinControlFeatures:
|
case CoinControlFeatures:
|
||||||
return fCoinControlFeatures;
|
return fCoinControlFeatures;
|
||||||
case EnablePSBTControls:
|
case EnablePSBTControls:
|
||||||
@ -860,6 +864,24 @@ bool OptionsModel::setOption(OptionID option, const QVariant& value, const std::
|
|||||||
settings.setValue("PeersTabAlternatingRowColors", m_peers_tab_alternating_row_colors);
|
settings.setValue("PeersTabAlternatingRowColors", m_peers_tab_alternating_row_colors);
|
||||||
Q_EMIT peersTabAlternatingRowColorsChanged(m_peers_tab_alternating_row_colors);
|
Q_EMIT peersTabAlternatingRowColorsChanged(m_peers_tab_alternating_row_colors);
|
||||||
break;
|
break;
|
||||||
|
#ifdef ENABLE_WALLET
|
||||||
|
case walletrbf:
|
||||||
|
if (changed()) {
|
||||||
|
const bool fNewValue = value.toBool();
|
||||||
|
const std::string newvalue_str = strprintf("%d", fNewValue);
|
||||||
|
gArgs.ModifyRWConfigFile("walletrbf", newvalue_str);
|
||||||
|
gArgs.ForceSetArg("-walletrbf", newvalue_str);
|
||||||
|
for (auto& wallet_interface : m_node.walletLoader().getWallets()) {
|
||||||
|
wallet::CWallet *wallet;
|
||||||
|
if (wallet_interface && (wallet = wallet_interface->wallet())) {
|
||||||
|
wallet->m_signal_rbf = fNewValue;
|
||||||
|
} else {
|
||||||
|
setRestartRequired(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
case CoinControlFeatures:
|
case CoinControlFeatures:
|
||||||
fCoinControlFeatures = value.toBool();
|
fCoinControlFeatures = value.toBool();
|
||||||
settings.setValue("fCoinControlFeatures", fCoinControlFeatures);
|
settings.setValue("fCoinControlFeatures", fCoinControlFeatures);
|
||||||
|
@ -64,6 +64,7 @@ public:
|
|||||||
FontForMoney, // FontChoice
|
FontForMoney, // FontChoice
|
||||||
FontForQRCodes, // FontChoice
|
FontForQRCodes, // FontChoice
|
||||||
PeersTabAlternatingRowColors, // bool
|
PeersTabAlternatingRowColors, // bool
|
||||||
|
walletrbf, // bool
|
||||||
CoinControlFeatures, // bool
|
CoinControlFeatures, // bool
|
||||||
SubFeeFromAmount, // bool
|
SubFeeFromAmount, // bool
|
||||||
ThreadsScriptVerif, // int
|
ThreadsScriptVerif, // int
|
||||||
|
Loading…
Reference in New Issue
Block a user