mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-12 19:20:42 +02:00
add gui for -rejectparasites
Co-authored-by: Luke Dashjr <luke_github1@dashjr.org>
This commit is contained in:
parent
18cd7b0ef6
commit
78f1ec0f8d
@ -263,6 +263,12 @@ OptionsDialog::OptionsDialog(QWidget* parent, bool enableWallet)
|
||||
verticalLayout_Spamfiltering->addWidget(rejectunknownscripts);
|
||||
FixTabOrder(rejectunknownscripts);
|
||||
|
||||
rejectparasites = new QCheckBox(groupBox_Spamfiltering);
|
||||
rejectparasites->setText(tr("Reject parasite transactions"));
|
||||
rejectparasites->setToolTip(tr("With this option enabled, transactions related to parasitic overlay protocols will be ignored. Parasites are transactions using Bitcoin as a technical infrastructure to animate other protocols, unrelated to ordinary money transfers."));
|
||||
verticalLayout_Spamfiltering->addWidget(rejectparasites);
|
||||
FixTabOrder(rejectparasites);
|
||||
|
||||
rejectspkreuse = new QCheckBox(groupBox_Spamfiltering);
|
||||
rejectspkreuse->setText(tr("Disallow most address reuse"));
|
||||
rejectspkreuse->setToolTip(tr("With this option enabled, your memory pool will only allow each unique payment destination to be used once, effectively deprioritising address reuse. Address reuse is not technically supported, and harms the privacy of all Bitcoin users. It also has limited real-world utility, and has been known to be common with spam."));
|
||||
@ -681,6 +687,7 @@ void OptionsDialog::setMapper()
|
||||
mapper->addMapping(mempoolexpiry, OptionsModel::mempoolexpiry);
|
||||
|
||||
mapper->addMapping(rejectunknownscripts, OptionsModel::rejectunknownscripts);
|
||||
mapper->addMapping(rejectparasites, OptionsModel::rejectparasites);
|
||||
mapper->addMapping(rejectspkreuse, OptionsModel::rejectspkreuse);
|
||||
mapper->addMapping(minrelaytxfee, OptionsModel::minrelaytxfee);
|
||||
mapper->addMapping(bytespersigop, OptionsModel::bytespersigop);
|
||||
|
@ -109,6 +109,7 @@ private:
|
||||
QSpinBox *mempoolexpiry;
|
||||
|
||||
QCheckBox *rejectunknownscripts;
|
||||
QCheckBox *rejectparasites;
|
||||
QCheckBox *rejectspkreuse;
|
||||
BitcoinAmountField *minrelaytxfee;
|
||||
QSpinBox *bytespersigop, *bytespersigopstrict;
|
||||
|
@ -635,6 +635,8 @@ QVariant OptionsModel::getOption(OptionID option, const std::string& suffix) con
|
||||
return qlonglong(std::chrono::duration_cast<std::chrono::hours>(node().mempool().m_expiry).count());
|
||||
case rejectunknownscripts:
|
||||
return node().mempool().m_require_standard;
|
||||
case rejectparasites:
|
||||
return node().mempool().m_reject_parasites;
|
||||
case rejectspkreuse:
|
||||
return f_rejectspkreuse;
|
||||
case minrelaytxfee:
|
||||
@ -1089,6 +1091,15 @@ bool OptionsModel::setOption(OptionID option, const QVariant& value, const std::
|
||||
}
|
||||
break;
|
||||
}
|
||||
case rejectparasites:
|
||||
{
|
||||
if (changed()) {
|
||||
const bool nv = value.toBool();
|
||||
node().mempool().m_reject_parasites = nv;
|
||||
node().updateRwSetting("rejectparasites", nv);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case rejectspkreuse:
|
||||
if (changed()) {
|
||||
const bool fNewValue = value.toBool();
|
||||
|
@ -87,6 +87,7 @@ public:
|
||||
incrementalrelayfee,
|
||||
mempoolexpiry,
|
||||
rejectunknownscripts, // bool
|
||||
rejectparasites, // bool
|
||||
rejectspkreuse, // bool
|
||||
minrelaytxfee,
|
||||
bytespersigop,
|
||||
|
Loading…
Reference in New Issue
Block a user