mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-12 19:20:42 +02:00
Qt/Options: Configure permitbaremultisig using rwconf
This commit is contained in:
parent
a0aeb7b065
commit
9f09a18e82
@ -255,6 +255,12 @@ OptionsDialog::OptionsDialog(QWidget* parent, bool enableWallet)
|
||||
limitdescendantsize->setMaximum(std::numeric_limits<int>::max());
|
||||
CreateOptionUI(verticalLayout_Spamfiltering, limitdescendantsize, tr("Ignore transactions if any ancestor would have more than %s kilobytes of unconfirmed descendants."));
|
||||
|
||||
rejectbaremultisig = new QCheckBox(groupBox_Spamfiltering);
|
||||
rejectbaremultisig->setText(tr("Ignore bare/exposed \"multisig\" scripts"));
|
||||
rejectbaremultisig->setToolTip(tr("Spam is sometimes disguised to appear as if it is an old-style N-of-M multi-party transaction, where most of the keys are really bogus. At the same time, legitimate multi-party transactions typically have always used P2SH format (which is not filtered by this option), which is more secure."));
|
||||
verticalLayout_Spamfiltering->addWidget(rejectbaremultisig);
|
||||
FixTabOrder(rejectbaremultisig);
|
||||
|
||||
verticalLayout_Mempool->addWidget(groupBox_Spamfiltering);
|
||||
|
||||
verticalLayout_Mempool->addItem(new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding));
|
||||
@ -504,6 +510,7 @@ void OptionsDialog::setMapper()
|
||||
mapper->addMapping(limitancestorsize, OptionsModel::limitancestorsize);
|
||||
mapper->addMapping(limitdescendantcount, OptionsModel::limitdescendantcount);
|
||||
mapper->addMapping(limitdescendantsize, OptionsModel::limitdescendantsize);
|
||||
mapper->addMapping(rejectbaremultisig, OptionsModel::rejectbaremultisig);
|
||||
|
||||
/* Window */
|
||||
#ifndef Q_OS_MACOS
|
||||
|
@ -100,6 +100,7 @@ private:
|
||||
QSpinBox *limitancestorsize;
|
||||
QSpinBox *limitdescendantcount;
|
||||
QSpinBox *limitdescendantsize;
|
||||
QCheckBox *rejectbaremultisig;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_OPTIONSDIALOG_H
|
||||
|
@ -633,6 +633,8 @@ QVariant OptionsModel::getOption(OptionID option, const std::string& suffix) con
|
||||
return qlonglong(node().mempool().m_limits.descendant_count);
|
||||
case limitdescendantsize:
|
||||
return qlonglong(node().mempool().m_limits.descendant_size_vbytes / 1'000);
|
||||
case rejectbaremultisig:
|
||||
return !node().mempool().m_permit_bare_multisig;
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
@ -1061,6 +1063,14 @@ bool OptionsModel::setOption(OptionID option, const QVariant& value, const std::
|
||||
gArgs.ModifyRWConfigFile("limitdescendantsize", strNv);
|
||||
}
|
||||
break;
|
||||
case rejectbaremultisig:
|
||||
if (changed()) {
|
||||
// The config and internal option is inverted
|
||||
const bool fNewValue = ! value.toBool();
|
||||
node().mempool().m_permit_bare_multisig = fNewValue;
|
||||
gArgs.ModifyRWConfigFile("permitbaremultisig", strprintf("%d", fNewValue));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -91,6 +91,7 @@ public:
|
||||
limitancestorsize,
|
||||
limitdescendantcount,
|
||||
limitdescendantsize,
|
||||
rejectbaremultisig, // bool
|
||||
OptionIDRowCount,
|
||||
};
|
||||
|
||||
|
@ -467,7 +467,7 @@ public:
|
||||
const CFeeRate m_incremental_relay_feerate;
|
||||
const CFeeRate m_min_relay_feerate;
|
||||
const CFeeRate m_dust_relay_feerate;
|
||||
const bool m_permit_bare_multisig;
|
||||
bool m_permit_bare_multisig;
|
||||
const std::optional<unsigned> m_max_datacarrier_bytes;
|
||||
bool m_datacarrier_fullcount;
|
||||
bool m_require_standard;
|
||||
|
Loading…
Reference in New Issue
Block a user