mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-13 03:30: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());
|
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."));
|
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->addWidget(groupBox_Spamfiltering);
|
||||||
|
|
||||||
verticalLayout_Mempool->addItem(new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding));
|
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(limitancestorsize, OptionsModel::limitancestorsize);
|
||||||
mapper->addMapping(limitdescendantcount, OptionsModel::limitdescendantcount);
|
mapper->addMapping(limitdescendantcount, OptionsModel::limitdescendantcount);
|
||||||
mapper->addMapping(limitdescendantsize, OptionsModel::limitdescendantsize);
|
mapper->addMapping(limitdescendantsize, OptionsModel::limitdescendantsize);
|
||||||
|
mapper->addMapping(rejectbaremultisig, OptionsModel::rejectbaremultisig);
|
||||||
|
|
||||||
/* Window */
|
/* Window */
|
||||||
#ifndef Q_OS_MACOS
|
#ifndef Q_OS_MACOS
|
||||||
|
@ -100,6 +100,7 @@ private:
|
|||||||
QSpinBox *limitancestorsize;
|
QSpinBox *limitancestorsize;
|
||||||
QSpinBox *limitdescendantcount;
|
QSpinBox *limitdescendantcount;
|
||||||
QSpinBox *limitdescendantsize;
|
QSpinBox *limitdescendantsize;
|
||||||
|
QCheckBox *rejectbaremultisig;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BITCOIN_QT_OPTIONSDIALOG_H
|
#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);
|
return qlonglong(node().mempool().m_limits.descendant_count);
|
||||||
case limitdescendantsize:
|
case limitdescendantsize:
|
||||||
return qlonglong(node().mempool().m_limits.descendant_size_vbytes / 1'000);
|
return qlonglong(node().mempool().m_limits.descendant_size_vbytes / 1'000);
|
||||||
|
case rejectbaremultisig:
|
||||||
|
return !node().mempool().m_permit_bare_multisig;
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
@ -1061,6 +1063,14 @@ bool OptionsModel::setOption(OptionID option, const QVariant& value, const std::
|
|||||||
gArgs.ModifyRWConfigFile("limitdescendantsize", strNv);
|
gArgs.ModifyRWConfigFile("limitdescendantsize", strNv);
|
||||||
}
|
}
|
||||||
break;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,7 @@ public:
|
|||||||
limitancestorsize,
|
limitancestorsize,
|
||||||
limitdescendantcount,
|
limitdescendantcount,
|
||||||
limitdescendantsize,
|
limitdescendantsize,
|
||||||
|
rejectbaremultisig, // bool
|
||||||
OptionIDRowCount,
|
OptionIDRowCount,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -467,7 +467,7 @@ public:
|
|||||||
const CFeeRate m_incremental_relay_feerate;
|
const CFeeRate m_incremental_relay_feerate;
|
||||||
const CFeeRate m_min_relay_feerate;
|
const CFeeRate m_min_relay_feerate;
|
||||||
const CFeeRate m_dust_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;
|
const std::optional<unsigned> m_max_datacarrier_bytes;
|
||||||
bool m_datacarrier_fullcount;
|
bool m_datacarrier_fullcount;
|
||||||
bool m_require_standard;
|
bool m_require_standard;
|
||||||
|
Loading…
Reference in New Issue
Block a user