refactor: Retire fixAmendmentMajorityCalc amendment (#5961)

Amendments activated for more than 2 years can be retired. This change retires the fixAmendmentMajorityCalc amendment.
This commit is contained in:
Jingchen
2025-10-31 20:01:12 +00:00
committed by GitHub
parent 4e32d2ed98
commit dfafb141cc
4 changed files with 10 additions and 47 deletions

View File

@@ -545,8 +545,7 @@ public:
for (auto const& [hash, nVotes] : votes)
{
if (rules.enabled(fixAmendmentMajorityCalc) ? nVotes >= i
: nVotes > i)
if (nVotes >= i)
{
// We vote yes on this amendment
field.push_back(hash);
@@ -982,10 +981,6 @@ public:
void
testChangedUNL(FeatureBitset const& feat)
{
// This test doesn't work without fixAmendmentMajorityCalc enabled.
if (!feat[fixAmendmentMajorityCalc])
return;
testcase("changedUNL");
auto const testAmendment = amendmentId("changedUNL");
@@ -1143,10 +1138,6 @@ public:
void
testValidatorFlapping(FeatureBitset const& feat)
{
// This test doesn't work without fixAmendmentMajorityCalc enabled.
if (!feat[fixAmendmentMajorityCalc])
return;
testcase("validatorFlapping");
// We run a test where a validator flaps on and off every 23 hours
@@ -1289,14 +1280,12 @@ public:
run() override
{
FeatureBitset const all{test::jtx::testable_amendments()};
FeatureBitset const fixMajorityCalc{fixAmendmentMajorityCalc};
testConstruct();
testGet();
testBadConfig();
testEnableVeto();
testHasUnsupported();
testFeature(all - fixMajorityCalc);
testFeature(all);
}
};