From c9135a63cd553a3276f51047d95c461e0d972a64 Mon Sep 17 00:00:00 2001 From: Vlad <129996061+vvysokikh1@users.noreply.github.com> Date: Wed, 16 Jul 2025 11:53:13 +0100 Subject: [PATCH 1/2] Retire Flow Cross amendment (#5562) The FlowCross amendment is now permanently enabled, so all code branches that have this amendment disabled are removed. --- include/xrpl/protocol/detail/features.macro | 3 +- src/test/app/CrossingLimits_test.cpp | 56 ++--------- src/test/app/DeliverMin_test.cpp | 2 - src/test/app/Discrepancy_test.cpp | 1 - src/test/app/Flow_test.cpp | 4 - src/test/app/Freeze_test.cpp | 33 ++---- src/test/app/Offer_test.cpp | 106 +++++--------------- src/test/app/PayStrand_test.cpp | 3 - src/test/app/PermissionedDEX_test.cpp | 18 ---- src/test/app/SetAuth_test.cpp | 1 - src/test/app/TrustAndBalance_test.cpp | 1 - src/test/ledger/BookDirs_test.cpp | 1 - src/test/ledger/PaymentSandbox_test.cpp | 1 - src/test/rpc/GatewayBalances_test.cpp | 5 +- src/test/rpc/NoRipple_test.cpp | 1 - src/xrpld/app/paths/detail/BookStep.cpp | 5 +- src/xrpld/app/tx/detail/CreateOffer.cpp | 75 +------------- src/xrpld/app/tx/detail/CreateOffer.h | 7 -- 18 files changed, 52 insertions(+), 271 deletions(-) diff --git a/include/xrpl/protocol/detail/features.macro b/include/xrpl/protocol/detail/features.macro index 93b4dedae3..63c1b2258b 100644 --- a/include/xrpl/protocol/detail/features.macro +++ b/include/xrpl/protocol/detail/features.macro @@ -98,7 +98,6 @@ XRPL_FEATURE(HardenedValidations, Supported::yes, VoteBehavior::DefaultYe // fix1781: XRPEndpointSteps should be included in the circular payment check XRPL_FIX (1781, Supported::yes, VoteBehavior::DefaultYes) XRPL_FEATURE(RequireFullyCanonicalSig, Supported::yes, VoteBehavior::DefaultYes) -// fixQualityUpperBound should be activated before FlowCross XRPL_FIX (QualityUpperBound, Supported::yes, VoteBehavior::DefaultYes) XRPL_FEATURE(DeletableAccounts, Supported::yes, VoteBehavior::DefaultYes) XRPL_FIX (PayChanRecipientOwnerDir, Supported::yes, VoteBehavior::DefaultYes) @@ -116,7 +115,6 @@ XRPL_FIX (1571, Supported::yes, VoteBehavior::DefaultYe XRPL_FEATURE(Checks, Supported::yes, VoteBehavior::DefaultYes) XRPL_FEATURE(DepositAuth, Supported::yes, VoteBehavior::DefaultYes) XRPL_FIX (1513, Supported::yes, VoteBehavior::DefaultYes) -XRPL_FEATURE(FlowCross, Supported::yes, VoteBehavior::DefaultYes) XRPL_FEATURE(Flow, Supported::yes, VoteBehavior::DefaultYes) // The following amendments are obsolete, but must remain supported @@ -159,3 +157,4 @@ XRPL_RETIRE(fix1201) XRPL_RETIRE(fix1512) XRPL_RETIRE(fix1523) XRPL_RETIRE(fix1528) +XRPL_RETIRE(FlowCross) diff --git a/src/test/app/CrossingLimits_test.cpp b/src/test/app/CrossingLimits_test.cpp index cef0b03399..ff4650a1f8 100644 --- a/src/test/app/CrossingLimits_test.cpp +++ b/src/test/app/CrossingLimits_test.cpp @@ -77,10 +77,8 @@ public: auto const gw = Account("gateway"); auto const USD = gw["USD"]; - // The number of allowed offers to cross is different between - // Taker and FlowCross. Taker allows 850 and FlowCross allows 1000. - // Accommodate that difference in the test. - int const maxConsumed = features[featureFlowCross] ? 1000 : 850; + // The payment engine allows 1000 offers to cross. + int const maxConsumed = 1000; env.fund(XRP(100000000), gw, "alice", "bob", "carol"); int const bobsOfferCount = maxConsumed + 150; @@ -119,11 +117,8 @@ public: env.fund(XRP(100000000), gw, "alice", "bob", "carol", "dan", "evita"); - // The number of offers allowed to cross is different between - // Taker and FlowCross. Taker allows 850 and FlowCross allows 1000. - // Accommodate that difference in the test. - bool const isFlowCross{features[featureFlowCross]}; - int const maxConsumed = isFlowCross ? 1000 : 850; + // The payment engine allows 1000 offers to cross. + int const maxConsumed = 1000; int const evitasOfferCount{maxConsumed + 49}; env.trust(USD(1000), "alice"); @@ -133,14 +128,8 @@ public: env.trust(USD(evitasOfferCount + 1), "evita"); env(pay(gw, "evita", USD(evitasOfferCount + 1))); - // Taker and FlowCross have another difference we must accommodate. - // Taker allows a total of 1000 unfunded offers to be consumed - // beyond the 850 offers it can take. FlowCross draws no such - // distinction; its limit is 1000 funded or unfunded. - // - // Give carol an extra 150 (unfunded) offers when we're using Taker - // to accommodate that difference. - int const carolsOfferCount{isFlowCross ? 700 : 850}; + // The payment engine has a limit of 1000 funded or unfunded offers. + int const carolsOfferCount{700}; n_offers(env, 400, "alice", XRP(1), USD(1)); n_offers(env, carolsOfferCount, "carol", XRP(1), USD(1)); n_offers(env, evitasOfferCount, "evita", XRP(1), USD(1)); @@ -268,9 +257,9 @@ public: } void - testAutoBridgedLimitsFlowCross(FeatureBitset features) + testAutoBridgedLimits(FeatureBitset features) { - testcase("Auto Bridged Limits FlowCross"); + testcase("Auto Bridged Limits"); // If any book step in a payment strand consumes 1000 offers, the // liquidity from the offers is used, but that strand will be marked as @@ -452,26 +441,6 @@ public: } } - void - testAutoBridgedLimits(FeatureBitset features) - { - // Taker and FlowCross are too different in the way they handle - // autobridging to make one test suit both approaches. - // - // o Taker alternates between books, completing one full increment - // before returning to make another pass. - // - // o FlowCross extracts as much as possible in one book at one Quality - // before proceeding to the other book. This reduces the number of - // times we change books. - // - // So the tests for the two forms of autobridging are separate. - if (features[featureFlowCross]) - testAutoBridgedLimitsFlowCross(features); - else - testAutoBridgedLimitsTaker(features); - } - void testOfferOverflow(FeatureBitset features) { @@ -522,11 +491,10 @@ public: n_offers(env, 998, alice, XRP(0.96), USD(1)); n_offers(env, 998, alice, XRP(0.95), USD(1)); - bool const withFlowCross = features[featureFlowCross]; bool const withSortStrands = features[featureFlowSortStrands]; auto const expectedTER = [&]() -> TER { - if (withFlowCross && !withSortStrands) + if (!withSortStrands) return TER{tecOVERSIZE}; return tesSUCCESS; }(); @@ -535,8 +503,6 @@ public: env.close(); auto const expectedUSD = [&] { - if (!withFlowCross) - return USD(850); if (!withSortStrands) return USD(0); return USD(1996); @@ -558,11 +524,9 @@ public: using namespace jtx; auto const sa = supported_amendments(); testAll(sa); + testAll(sa - featureFlowSortStrands); testAll(sa - featurePermissionedDEX); testAll(sa - featureFlowSortStrands - featurePermissionedDEX); - testAll( - sa - featureFlowCross - featureFlowSortStrands - - featurePermissionedDEX); } }; diff --git a/src/test/app/DeliverMin_test.cpp b/src/test/app/DeliverMin_test.cpp index 4ee7c9c72e..83d7c4a1b9 100644 --- a/src/test/app/DeliverMin_test.cpp +++ b/src/test/app/DeliverMin_test.cpp @@ -143,8 +143,6 @@ public: { using namespace jtx; auto const sa = supported_amendments(); - test_convert_all_of_an_asset( - sa - featureFlowCross - featurePermissionedDEX); test_convert_all_of_an_asset(sa - featurePermissionedDEX); test_convert_all_of_an_asset(sa); } diff --git a/src/test/app/Discrepancy_test.cpp b/src/test/app/Discrepancy_test.cpp index bc72b2fd16..ab8d5a605f 100644 --- a/src/test/app/Discrepancy_test.cpp +++ b/src/test/app/Discrepancy_test.cpp @@ -147,7 +147,6 @@ public: { using namespace test::jtx; auto const sa = supported_amendments(); - testXRPDiscrepancy(sa - featureFlowCross - featurePermissionedDEX); testXRPDiscrepancy(sa - featurePermissionedDEX); testXRPDiscrepancy(sa); } diff --git a/src/test/app/Flow_test.cpp b/src/test/app/Flow_test.cpp index 68485f4eee..0953b6f44f 100644 --- a/src/test/app/Flow_test.cpp +++ b/src/test/app/Flow_test.cpp @@ -1333,7 +1333,6 @@ struct Flow_test : public beast::unit_test::suite using namespace jtx; auto const sa = supported_amendments(); - testWithFeats(sa - featureFlowCross - featurePermissionedDEX); testWithFeats(sa - featurePermissionedDEX); testWithFeats(sa); testEmptyStrand(sa); @@ -1347,12 +1346,9 @@ struct Flow_manual_test : public Flow_test { using namespace jtx; auto const all = supported_amendments(); - FeatureBitset const flowCross{featureFlowCross}; FeatureBitset const f1513{fix1513}; FeatureBitset const permDex{featurePermissionedDEX}; - testWithFeats(all - flowCross - f1513 - permDex); - testWithFeats(all - flowCross - permDex); testWithFeats(all - f1513 - permDex); testWithFeats(all - permDex); testWithFeats(all); diff --git a/src/test/app/Freeze_test.cpp b/src/test/app/Freeze_test.cpp index 8c2021d657..8002aa2a3b 100644 --- a/src/test/app/Freeze_test.cpp +++ b/src/test/app/Freeze_test.cpp @@ -961,24 +961,12 @@ class Freeze_test : public beast::unit_test::suite env.close(); // test: A1 wants to buy, must fail - if (features[featureFlowCross]) - { - env(offer(A1, USD(1), XRP(2)), - txflags(tfFillOrKill), - ter(tecKILLED)); - env.close(); - env.require( - balance(A1, USD(1002)), - balance(A2, USD(997)), - offers(A1, 0)); - } - else - { - // The transaction that should be here would succeed. - // I don't want to adjust balances in following tests. Flow - // cross feature flag is not relevant to this particular test - // case so we're not missing out some corner cases checks. - } + env(offer(A1, USD(1), XRP(2)), + txflags(tfFillOrKill), + ter(tecKILLED)); + env.close(); + env.require( + balance(A1, USD(1002)), balance(A2, USD(997)), offers(A1, 0)); // test: A1 can create passive sell offer env(offer(A1, XRP(2), USD(1)), txflags(tfPassive)); @@ -2107,17 +2095,14 @@ public: }; using namespace test::jtx; auto const sa = supported_amendments(); - testAll( - sa - featureFlowCross - featureDeepFreeze - featurePermissionedDEX - - fixEnforceNFTokenTrustlineV2); - testAll( - sa - featureFlowCross - featurePermissionedDEX - - fixEnforceNFTokenTrustlineV2); testAll( sa - featureDeepFreeze - featurePermissionedDEX - fixEnforceNFTokenTrustlineV2); testAll(sa - featurePermissionedDEX - fixEnforceNFTokenTrustlineV2); + testAll(sa - featureDeepFreeze - featurePermissionedDEX); + testAll(sa - featurePermissionedDEX); testAll(sa - fixEnforceNFTokenTrustlineV2); + testAll(sa - featureDeepFreeze); testAll(sa); } }; diff --git a/src/test/app/Offer_test.cpp b/src/test/app/Offer_test.cpp index d3481881c4..1c877fedef 100644 --- a/src/test/app/Offer_test.cpp +++ b/src/test/app/Offer_test.cpp @@ -1343,18 +1343,10 @@ public: // NOTE : // At this point, all offers are expected to be consumed. - // Alas, they are not - because of a bug in the Taker auto-bridging - // implementation which is addressed by fixTakerDryOfferRemoval. - // The pre-fixTakerDryOfferRemoval implementation (incorrect) leaves - // an empty offer in the second leg of the bridge. Validate both the - // old and the new behavior. { auto acctOffers = offersOnAccount(env, account_to_test); - bool const noStaleOffers{ - features[featureFlowCross] || - features[fixTakerDryOfferRemoval]}; - BEAST_EXPECT(acctOffers.size() == (noStaleOffers ? 0 : 1)); + BEAST_EXPECT(acctOffers.size() == 0); for (auto const& offerPtr : acctOffers) { auto const& offer = *offerPtr; @@ -1464,8 +1456,7 @@ public: std::uint32_t const bobOfferSeq = env.seq(bob); env(offer(bob, XRP(2000), USD(1))); - if (localFeatures[featureFlowCross] && - localFeatures[fixReducedOffersV2]) + if (localFeatures[fixReducedOffersV2]) { // With the rounding introduced by fixReducedOffersV2, bob's // offer does not cross alice's offer and goes straight into @@ -1489,8 +1480,7 @@ public: // crossing algorithms becomes apparent. The old offer crossing // would consume small_amount and transfer no XRP. The new offer // crossing transfers a single drop, rather than no drops. - auto const crossingDelta = - localFeatures[featureFlowCross] ? drops(1) : drops(0); + auto const crossingDelta = drops(1); jrr = ledgerEntryState(env, alice, gw, "USD"); BEAST_EXPECT( @@ -2044,15 +2034,9 @@ public: env.require(balance(carol, USD(0))); env.require(balance(carol, EUR(none))); - // If neither featureFlowCross nor fixTakerDryOfferRemoval are defined - // then carol's offer will be left on the books, but with zero value. - int const emptyOfferCount{ - features[featureFlowCross] || features[fixTakerDryOfferRemoval] - ? 0 - : 1}; - env.require(offers(carol, 0 + emptyOfferCount)); - env.require(owners(carol, 1 + emptyOfferCount)); + env.require(offers(carol, 0)); + env.require(owners(carol, 1)); } void @@ -4236,22 +4220,13 @@ public: }; // clang-format off - TestData const takerTests[]{ - // btcStart ------------------- actor[0] -------------------- ------------------- actor[1] -------------------- - {0, 0, 1, BTC(5), {{"deb", 0, drops(3900000'000000 - 4 * baseFee), BTC(5), USD(3000)}, {"dan", 0, drops(4100000'000000 - 3 * baseFee), BTC(0), USD(750)}}}, // no BTC xfer fee - {0, 0, 0, BTC(5), {{"flo", 0, drops(4000000'000000 - 5 * baseFee), BTC(5), USD(2000)} }} // no xfer fee - }; - - TestData const flowTests[]{ + TestData const tests[]{ // btcStart ------------------- actor[0] -------------------- ------------------- actor[1] -------------------- {0, 0, 1, BTC(5), {{"gay", 1, drops(3950000'000000 - 4 * baseFee), BTC(5), USD(2500)}, {"gar", 1, drops(4050000'000000 - 3 * baseFee), BTC(0), USD(1375)}}}, // no BTC xfer fee {0, 0, 0, BTC(5), {{"hye", 2, drops(4000000'000000 - 5 * baseFee), BTC(5), USD(2000)} }} // no xfer fee }; // clang-format on - // Pick the right tests. - auto const& tests = features[featureFlowCross] ? flowTests : takerTests; - for (auto const& t : tests) { Account const& self = t.actors[t.self].acct; @@ -4378,9 +4353,8 @@ public: // 1. alice creates an offer to acquire USD/gw, an asset for which // she does not have a trust line. At some point in the future, // gw adds lsfRequireAuth. Then, later, alice's offer is crossed. - // a. With Taker alice's unauthorized offer is consumed. - // b. With FlowCross alice's offer is deleted, not consumed, - // since alice is not authorized to hold USD/gw. + // Alice's offer is deleted, not consumed, since alice is not + // authorized to hold USD/gw. // // 2. alice tries to create an offer for USD/gw, now that gw has // lsfRequireAuth set. This time the offer create fails because @@ -4428,33 +4402,17 @@ public: // gw now requires authorization and bob has gwUSD(50). Let's see if // bob can cross alice's offer. // - // o With Taker bob's offer should cross alice's. - // o With FlowCross bob's offer shouldn't cross and alice's - // unauthorized offer should be deleted. + // Bob's offer shouldn't cross and alice's unauthorized offer should be + // deleted. env(offer(bob, XRP(4000), gwUSD(40))); env.close(); std::uint32_t const bobOfferSeq = env.seq(bob) - 1; - bool const flowCross = features[featureFlowCross]; - env.require(offers(alice, 0)); - if (flowCross) - { - // alice's unauthorized offer is deleted & bob's offer not crossed. - env.require(balance(alice, gwUSD(none))); - env.require(offers(bob, 1)); - env.require(balance(bob, gwUSD(50))); - } - else - { - // alice's offer crosses bob's - env.require(balance(alice, gwUSD(40))); - env.require(offers(bob, 0)); - env.require(balance(bob, gwUSD(10))); - - // The rest of the test verifies FlowCross behavior. - return; - } + // alice's unauthorized offer is deleted & bob's offer not crossed. + env.require(balance(alice, gwUSD(none))); + env.require(offers(bob, 1)); + env.require(balance(bob, gwUSD(50))); // See if alice can create an offer without authorization. alice // should not be able to create the offer and bob's offer should be @@ -5186,9 +5144,7 @@ public: // tfFillOrKill, TakerPays must be filled { TER const err = - features[fixFillOrKill] || !features[featureFlowCross] - ? TER(tesSUCCESS) - : tecKILLED; + features[fixFillOrKill] ? TER(tesSUCCESS) : tecKILLED; env(offer(maker, XRP(100), USD(100))); env.close(); @@ -5410,7 +5366,6 @@ public: { using namespace jtx; static FeatureBitset const all{supported_amendments()}; - static FeatureBitset const flowCross{featureFlowCross}; static FeatureBitset const takerDryOffer{fixTakerDryOfferRemoval}; static FeatureBitset const rmSmallIncreasedQOffers{ fixRmSmallIncreasedQOffers}; @@ -5419,10 +5374,9 @@ public: FeatureBitset const fillOrKill{fixFillOrKill}; FeatureBitset const permDEX{featurePermissionedDEX}; - static std::array const feats{ + static std::array const feats{ all - takerDryOffer - immediateOfferKilled - permDEX, - all - flowCross - takerDryOffer - immediateOfferKilled - permDEX, - all - flowCross - immediateOfferKilled - permDEX, + all - immediateOfferKilled - permDEX, all - rmSmallIncreasedQOffers - immediateOfferKilled - fillOrKill - permDEX, all - fillOrKill - permDEX, @@ -5444,7 +5398,7 @@ public: } }; -class OfferWOFlowCross_test : public OfferBaseUtil_test +class OfferWTakerDryOffer_test : public OfferBaseUtil_test { void run() override @@ -5453,7 +5407,7 @@ class OfferWOFlowCross_test : public OfferBaseUtil_test } }; -class OfferWTakerDryOffer_test : public OfferBaseUtil_test +class OfferWOSmallQOffers_test : public OfferBaseUtil_test { void run() override @@ -5462,7 +5416,7 @@ class OfferWTakerDryOffer_test : public OfferBaseUtil_test } }; -class OfferWOSmallQOffers_test : public OfferBaseUtil_test +class OfferWOFillOrKill_test : public OfferBaseUtil_test { void run() override @@ -5471,7 +5425,7 @@ class OfferWOSmallQOffers_test : public OfferBaseUtil_test } }; -class OfferWOFillOrKill_test : public OfferBaseUtil_test +class OfferWOPermDEX_test : public OfferBaseUtil_test { void run() override @@ -5480,21 +5434,12 @@ class OfferWOFillOrKill_test : public OfferBaseUtil_test } }; -class OfferWOPermDEX_test : public OfferBaseUtil_test -{ - void - run() override - { - OfferBaseUtil_test::run(5); - } -}; - class OfferAllFeatures_test : public OfferBaseUtil_test { void run() override { - OfferBaseUtil_test::run(6, true); + OfferBaseUtil_test::run(5, true); } }; @@ -5505,26 +5450,23 @@ class Offer_manual_test : public OfferBaseUtil_test { using namespace jtx; FeatureBitset const all{supported_amendments()}; - FeatureBitset const flowCross{featureFlowCross}; FeatureBitset const f1513{fix1513}; FeatureBitset const immediateOfferKilled{featureImmediateOfferKilled}; FeatureBitset const takerDryOffer{fixTakerDryOfferRemoval}; FeatureBitset const fillOrKill{fixFillOrKill}; FeatureBitset const permDEX{featurePermissionedDEX}; - testAll(all - flowCross - f1513 - immediateOfferKilled - permDEX); - testAll(all - flowCross - immediateOfferKilled - permDEX); + testAll(all - f1513 - immediateOfferKilled - permDEX); testAll(all - immediateOfferKilled - fillOrKill - permDEX); testAll(all - fillOrKill - permDEX); testAll(all - permDEX); testAll(all); - testAll(all - flowCross - takerDryOffer - permDEX); + testAll(all - takerDryOffer - permDEX); } }; BEAST_DEFINE_TESTSUITE_PRIO(OfferBaseUtil, tx, ripple, 2); -BEAST_DEFINE_TESTSUITE_PRIO(OfferWOFlowCross, tx, ripple, 2); BEAST_DEFINE_TESTSUITE_PRIO(OfferWTakerDryOffer, tx, ripple, 2); BEAST_DEFINE_TESTSUITE_PRIO(OfferWOSmallQOffers, tx, ripple, 2); BEAST_DEFINE_TESTSUITE_PRIO(OfferWOFillOrKill, tx, ripple, 2); diff --git a/src/test/app/PayStrand_test.cpp b/src/test/app/PayStrand_test.cpp index 9188da62ac..fe9c11a318 100644 --- a/src/test/app/PayStrand_test.cpp +++ b/src/test/app/PayStrand_test.cpp @@ -1268,15 +1268,12 @@ struct PayStrand_test : public beast::unit_test::suite { using namespace jtx; auto const sa = supported_amendments(); - testToStrand(sa - featureFlowCross - featurePermissionedDEX); testToStrand(sa - featurePermissionedDEX); testToStrand(sa); - testRIPD1373(sa - featureFlowCross - featurePermissionedDEX); testRIPD1373(sa - featurePermissionedDEX); testRIPD1373(sa); - testLoop(sa - featureFlowCross - featurePermissionedDEX); testLoop(sa - featurePermissionedDEX); testLoop(sa); diff --git a/src/test/app/PermissionedDEX_test.cpp b/src/test/app/PermissionedDEX_test.cpp index 693381debf..f2d40140cd 100644 --- a/src/test/app/PermissionedDEX_test.cpp +++ b/src/test/app/PermissionedDEX_test.cpp @@ -207,24 +207,6 @@ class PermissionedDEX_test : public beast::unit_test::suite env.close(); } - // test preflight: permissioned dex cannot be used without enable - // flowcross - { - Env env(*this, features - featureFlowCross); - auto const& [gw, domainOwner, alice, bob, carol, USD, domainID, credType] = - PermissionedDEX(env); - - env(offer(bob, XRP(10), USD(10)), - domain(domainID), - ter(temDISABLED)); - env.close(); - - env.enableFeature(featureFlowCross); - env.close(); - env(offer(bob, XRP(10), USD(10)), domain(domainID)); - env.close(); - } - // preclaim - someone outside of the domain cannot create domain offer { Env env(*this, features); diff --git a/src/test/app/SetAuth_test.cpp b/src/test/app/SetAuth_test.cpp index a4c2df6228..28a5b3be91 100644 --- a/src/test/app/SetAuth_test.cpp +++ b/src/test/app/SetAuth_test.cpp @@ -75,7 +75,6 @@ struct SetAuth_test : public beast::unit_test::suite { using namespace jtx; auto const sa = supported_amendments(); - testAuth(sa - featureFlowCross - featurePermissionedDEX); testAuth(sa - featurePermissionedDEX); testAuth(sa); } diff --git a/src/test/app/TrustAndBalance_test.cpp b/src/test/app/TrustAndBalance_test.cpp index 8f092a725f..d57e8ec418 100644 --- a/src/test/app/TrustAndBalance_test.cpp +++ b/src/test/app/TrustAndBalance_test.cpp @@ -481,7 +481,6 @@ public: using namespace test::jtx; auto const sa = supported_amendments(); - testWithFeatures(sa - featureFlowCross - featurePermissionedDEX); testWithFeatures(sa - featurePermissionedDEX); testWithFeatures(sa); } diff --git a/src/test/ledger/BookDirs_test.cpp b/src/test/ledger/BookDirs_test.cpp index 28d9d2c102..45cd7e332d 100644 --- a/src/test/ledger/BookDirs_test.cpp +++ b/src/test/ledger/BookDirs_test.cpp @@ -104,7 +104,6 @@ struct BookDirs_test : public beast::unit_test::suite { using namespace jtx; auto const sa = supported_amendments(); - test_bookdir(sa - featureFlowCross - featurePermissionedDEX); test_bookdir(sa - featurePermissionedDEX); test_bookdir(sa); } diff --git a/src/test/ledger/PaymentSandbox_test.cpp b/src/test/ledger/PaymentSandbox_test.cpp index 8bb0666e06..7901cec364 100644 --- a/src/test/ledger/PaymentSandbox_test.cpp +++ b/src/test/ledger/PaymentSandbox_test.cpp @@ -421,7 +421,6 @@ public: }; using namespace jtx; auto const sa = supported_amendments(); - testAll(sa - featureFlowCross - featurePermissionedDEX); testAll(sa - featurePermissionedDEX); testAll(sa); } diff --git a/src/test/rpc/GatewayBalances_test.cpp b/src/test/rpc/GatewayBalances_test.cpp index 7e9273d25e..93e88b78ac 100644 --- a/src/test/rpc/GatewayBalances_test.cpp +++ b/src/test/rpc/GatewayBalances_test.cpp @@ -252,10 +252,7 @@ public: { using namespace jtx; auto const sa = supported_amendments(); - for (auto feature : - {sa - featureFlowCross - featurePermissionedDEX, - sa - featurePermissionedDEX, - sa}) + for (auto feature : {sa - featurePermissionedDEX, sa}) { testGWB(feature); testGWBApiVersions(feature); diff --git a/src/test/rpc/NoRipple_test.cpp b/src/test/rpc/NoRipple_test.cpp index 42c86b34bb..1450abef69 100644 --- a/src/test/rpc/NoRipple_test.cpp +++ b/src/test/rpc/NoRipple_test.cpp @@ -294,7 +294,6 @@ public: }; using namespace jtx; auto const sa = supported_amendments(); - withFeatsTests(sa - featureFlowCross - featurePermissionedDEX); withFeatsTests(sa - featurePermissionedDEX); withFeatsTests(sa); } diff --git a/src/xrpld/app/paths/detail/BookStep.cpp b/src/xrpld/app/paths/detail/BookStep.cpp index 8d20a9900c..554d2525f5 100644 --- a/src/xrpld/app/paths/detail/BookStep.cpp +++ b/src/xrpld/app/paths/detail/BookStep.cpp @@ -743,7 +743,6 @@ BookStep::forEachOffer( FlowOfferStream offers( sb, afView, book_, sb.parentCloseTime(), counter, j_); - bool const flowCross = afView.rules().enabled(featureFlowCross); bool offerAttempted = false; std::optional ofrQ; auto execOffer = [&](auto& offer) { @@ -760,8 +759,8 @@ BookStep::forEachOffer( // Make sure offer owner has authorization to own IOUs from issuer. // An account can always own XRP or their own IOUs. - if (flowCross && (!isXRP(offer.issueIn().currency)) && - (offer.owner() != offer.issueIn().account)) + if (!isXRP(offer.issueIn().currency) && + offer.owner() != offer.issueIn().account) { auto const& issuerID = offer.issueIn().account; auto const issuer = afView.read(keylet::account(issuerID)); diff --git a/src/xrpld/app/tx/detail/CreateOffer.cpp b/src/xrpld/app/tx/detail/CreateOffer.cpp index 7ccecd7a47..9543a4fcd9 100644 --- a/src/xrpld/app/tx/detail/CreateOffer.cpp +++ b/src/xrpld/app/tx/detail/CreateOffer.cpp @@ -50,12 +50,6 @@ CreateOffer::preflight(PreflightContext const& ctx) !ctx.rules.enabled(featurePermissionedDEX)) return temDISABLED; - // Permissioned offers should use the PE (which must be enabled by - // featureFlowCross amendment) - if (ctx.rules.enabled(featurePermissionedDEX) && - !ctx.rules.enabled(featureFlowCross)) - return temDISABLED; - if (auto const ret = preflight1(ctx); !isTesSuccess(ret)) return ret; @@ -685,54 +679,6 @@ CreateOffer::step_account(OfferStream& stream, Taker const& taker) return false; } -// Fill as much of the offer as possible by consuming offers -// already on the books. Return the status and the amount of -// the offer to left unfilled. -std::pair -CreateOffer::takerCross( - Sandbox& sb, - Sandbox& sbCancel, - Amounts const& takerAmount) -{ - NetClock::time_point const when = sb.parentCloseTime(); - - beast::WrappedSink takerSink(j_, "Taker "); - - Taker taker( - cross_type_, - sb, - account_, - takerAmount, - ctx_.tx.getFlags(), - beast::Journal(takerSink)); - - // If the taker is unfunded before we begin crossing - // there's nothing to do - just return an error. - // - // We check this in preclaim, but when selling XRP - // charged fees can cause a user's available balance - // to go to 0 (by causing it to dip below the reserve) - // so we check this case again. - if (taker.unfunded()) - { - JLOG(j_.debug()) << "Not crossing: taker is unfunded."; - return {tecUNFUNDED_OFFER, takerAmount}; - } - - try - { - if (cross_type_ == CrossType::IouToIou) - return bridged_cross(taker, sb, sbCancel, when); - - return direct_cross(taker, sb, sbCancel, when); - } - catch (std::exception const& e) - { - JLOG(j_.error()) << "Exception during offer crossing: " << e.what(); - return {tecINTERNAL, taker.remaining_offer()}; - } -} - std::pair CreateOffer::flowCross( PaymentSandbox& psb, @@ -944,22 +890,11 @@ CreateOffer::cross( Amounts const& takerAmount, std::optional const& domainID) { - if (sb.rules().enabled(featureFlowCross)) - { - PaymentSandbox psbFlow{&sb}; - PaymentSandbox psbCancelFlow{&sbCancel}; - auto const ret = - flowCross(psbFlow, psbCancelFlow, takerAmount, domainID); - psbFlow.apply(sb); - psbCancelFlow.apply(sbCancel); - return ret; - } - - Sandbox sbTaker{&sb}; - Sandbox sbCancelTaker{&sbCancel}; - auto const ret = takerCross(sbTaker, sbCancelTaker, takerAmount); - sbTaker.apply(sb); - sbCancelTaker.apply(sbCancel); + PaymentSandbox psbFlow{&sb}; + PaymentSandbox psbCancelFlow{&sbCancel}; + auto const ret = flowCross(psbFlow, psbCancelFlow, takerAmount, domainID); + psbFlow.apply(sb); + psbCancelFlow.apply(sbCancel); return ret; } diff --git a/src/xrpld/app/tx/detail/CreateOffer.h b/src/xrpld/app/tx/detail/CreateOffer.h index 9b35062d8a..f995f4a5d6 100644 --- a/src/xrpld/app/tx/detail/CreateOffer.h +++ b/src/xrpld/app/tx/detail/CreateOffer.h @@ -109,13 +109,6 @@ private: bool reachedOfferCrossingLimit(Taker const& taker) const; - // Fill offer as much as possible by consuming offers already on the books, - // and adjusting account balances accordingly. - // - // Charges fees on top to taker. - std::pair - takerCross(Sandbox& sb, Sandbox& sbCancel, Amounts const& takerAmount); - // Use the payment flow code to perform offer crossing. std::pair flowCross( From 8bfaa7fe0aed0cfda56b27be96f0d6e2cde5dd71 Mon Sep 17 00:00:00 2001 From: Vlad <129996061+vvysokikh1@users.noreply.github.com> Date: Wed, 16 Jul 2025 12:47:54 +0100 Subject: [PATCH 2/2] test: Run unit tests regardless of 'Supported' amendment status (#5537) --- src/test/app/AMMClawback_test.cpp | 2 +- src/test/app/AMMExtended_test.cpp | 20 ++++++------ src/test/app/AMM_test.cpp | 38 ++++++++++++--------- src/test/app/AccountDelete_test.cpp | 8 ++--- src/test/app/AmendmentTable_test.cpp | 2 +- src/test/app/Batch_test.cpp | 2 +- src/test/app/Check_test.cpp | 2 +- src/test/app/Clawback_test.cpp | 2 +- src/test/app/Credentials_test.cpp | 2 +- src/test/app/CrossingLimits_test.cpp | 2 +- src/test/app/DID_test.cpp | 2 +- src/test/app/Delegate_test.cpp | 2 +- src/test/app/DeliverMin_test.cpp | 2 +- src/test/app/DepositAuth_test.cpp | 16 ++++----- src/test/app/Discrepancy_test.cpp | 2 +- src/test/app/EscrowToken_test.cpp | 2 +- src/test/app/Escrow_test.cpp | 4 +-- src/test/app/FixNFTokenPageLinks_test.cpp | 8 ++--- src/test/app/Flow_test.cpp | 8 ++--- src/test/app/Freeze_test.cpp | 2 +- src/test/app/LPTokenTransfer_test.cpp | 2 +- src/test/app/LedgerMaster_test.cpp | 2 +- src/test/app/MPToken_test.cpp | 4 +-- src/test/app/MultiSign_test.cpp | 4 +-- src/test/app/NFTokenAuth_test.cpp | 2 +- src/test/app/NFTokenBurn_test.cpp | 2 +- src/test/app/NFTokenDir_test.cpp | 2 +- src/test/app/NFToken_test.cpp | 2 +- src/test/app/Offer_test.cpp | 4 +-- src/test/app/Oracle_test.cpp | 4 +-- src/test/app/PayChan_test.cpp | 4 +-- src/test/app/PayStrand_test.cpp | 2 +- src/test/app/PermissionedDEX_test.cpp | 2 +- src/test/app/PermissionedDomains_test.cpp | 6 ++-- src/test/app/PseudoTx_test.cpp | 2 +- src/test/app/ReducedOffer_test.cpp | 20 ++++++------ src/test/app/SetAuth_test.cpp | 2 +- src/test/app/SetRegularKey_test.cpp | 8 ++--- src/test/app/SetTrust_test.cpp | 2 +- src/test/app/TheoreticalQuality_test.cpp | 4 +-- src/test/app/Ticket_test.cpp | 6 ++-- src/test/app/TrustAndBalance_test.cpp | 2 +- src/test/app/Vault_test.cpp | 40 ++++++++++------------- src/test/app/XChain_test.cpp | 4 +-- src/test/app/tx/apply_test.cpp | 4 +-- src/test/consensus/NegativeUNL_test.cpp | 6 ++-- src/test/jtx/AMMTest.h | 4 +-- src/test/jtx/Env.h | 8 ++--- src/test/jtx/Env_test.cpp | 8 ++--- src/test/jtx/impl/xchain_bridge.cpp | 2 +- src/test/ledger/BookDirs_test.cpp | 2 +- src/test/ledger/Directory_test.cpp | 2 +- src/test/ledger/Invariants_test.cpp | 2 +- src/test/ledger/PaymentSandbox_test.cpp | 2 +- src/test/rpc/AMMInfo_test.cpp | 2 +- src/test/rpc/AccountInfo_test.cpp | 2 +- src/test/rpc/AccountObjects_test.cpp | 2 +- src/test/rpc/AccountSet_test.cpp | 4 +-- src/test/rpc/BookChanges_test.cpp | 2 +- src/test/rpc/Book_test.cpp | 4 +-- src/test/rpc/GatewayBalances_test.cpp | 2 +- src/test/rpc/LedgerData_test.cpp | 4 +-- src/test/rpc/LedgerEntry_test.cpp | 2 +- src/test/rpc/NoRipple_test.cpp | 2 +- src/test/rpc/Subscribe_test.cpp | 4 +-- src/test/rpc/Transaction_test.cpp | 2 +- 66 files changed, 167 insertions(+), 165 deletions(-) diff --git a/src/test/app/AMMClawback_test.cpp b/src/test/app/AMMClawback_test.cpp index 83257f0755..9564911664 100644 --- a/src/test/app/AMMClawback_test.cpp +++ b/src/test/app/AMMClawback_test.cpp @@ -2443,7 +2443,7 @@ class AMMClawback_test : public beast::unit_test::suite run() override { FeatureBitset const all{ - jtx::supported_amendments() | fixAMMClawbackRounding}; + jtx::testable_amendments() | fixAMMClawbackRounding}; testInvalidRequest(); testFeatureDisabled(all - featureAMMClawback); diff --git a/src/test/app/AMMExtended_test.cpp b/src/test/app/AMMExtended_test.cpp index 70b2f30e1d..893e9e4f75 100644 --- a/src/test/app/AMMExtended_test.cpp +++ b/src/test/app/AMMExtended_test.cpp @@ -1447,7 +1447,7 @@ private: testOffers() { using namespace jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; testRmFundedOffer(all); testRmFundedOffer(all - fixAMMv1_1 - fixAMMv1_3); testEnforceNoRipple(all); @@ -2823,8 +2823,8 @@ private: for (auto const withFix : {true, false}) { auto const feats = withFix - ? supported_amendments() - : supported_amendments() - FeatureBitset{fix1781}; + ? testable_amendments() + : testable_amendments() - FeatureBitset{fix1781}; // Payment path starting with XRP Env env(*this, feats); @@ -3789,7 +3789,7 @@ private: testFlow() { using namespace jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; testFalseDry(all); testBookStep(all); @@ -3803,7 +3803,7 @@ private: testCrossingLimits() { using namespace jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; testStepLimit(all); testStepLimit(all - fixAMMv1_1 - fixAMMv1_3); } @@ -3812,7 +3812,7 @@ private: testDeliverMin() { using namespace jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; test_convert_all_of_an_asset(all); test_convert_all_of_an_asset(all - fixAMMv1_1 - fixAMMv1_3); } @@ -3820,7 +3820,7 @@ private: void testDepositAuth() { - auto const supported{jtx::supported_amendments()}; + auto const supported{jtx::testable_amendments()}; testPayment(supported - featureDepositPreauth); testPayment(supported); testPayIOU(); @@ -3830,7 +3830,7 @@ private: testFreeze() { using namespace test::jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); testRippleState(sa); testGlobalFreeze(sa); testOffersWhenFrozen(sa); @@ -3840,7 +3840,7 @@ private: testMultisign() { using namespace jtx; - auto const all = supported_amendments(); + auto const all = testable_amendments(); testTxMultisign( all - featureMultiSignReserve - featureExpandedSignerList); @@ -3852,7 +3852,7 @@ private: testPayStrand() { using namespace jtx; - auto const all = supported_amendments(); + auto const all = testable_amendments(); testToStrand(all); testRIPD1373(all); diff --git a/src/test/app/AMM_test.cpp b/src/test/app/AMM_test.cpp index 2ee9e5f1f3..c89aebf813 100644 --- a/src/test/app/AMM_test.cpp +++ b/src/test/app/AMM_test.cpp @@ -66,7 +66,7 @@ private: {}, 0, {}, - {supported_amendments() | featureSingleAssetVault}); + {testable_amendments() | featureSingleAssetVault}); // XRP to IOU, without featureSingleAssetVault testAMM( @@ -77,7 +77,7 @@ private: {}, 0, {}, - {supported_amendments() - featureSingleAssetVault}); + {testable_amendments() - featureSingleAssetVault}); // IOU to IOU testAMM( @@ -1385,7 +1385,7 @@ private: testcase("Deposit"); using namespace jtx; - auto const all = supported_amendments(); + auto const all = testable_amendments(); // Equal deposit: 1000000 tokens, 10% of the current pool testAMM([&](AMM& ammAlice, Env& env) { @@ -1687,7 +1687,7 @@ private: testcase("Invalid Withdraw"); using namespace jtx; - auto const all = supported_amendments(); + auto const all = testable_amendments(); testAMM( [&](AMM& ammAlice, Env& env) { @@ -2267,7 +2267,7 @@ private: testcase("Withdraw"); using namespace jtx; - auto const all = supported_amendments(); + auto const all = testable_amendments(); // Equal withdrawal by Carol: 1000000 of tokens, 10% of the current // pool @@ -2688,7 +2688,7 @@ private: { testcase("Fee Vote"); using namespace jtx; - auto const all = supported_amendments(); + auto const all = testable_amendments(); // One vote sets fee to 1%. testAMM([&](AMM& ammAlice, Env& env) { @@ -4855,7 +4855,7 @@ private: { testcase("Amendment"); using namespace jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; FeatureBitset const noAMM{all - featureAMM}; FeatureBitset const noNumber{all - fixUniversalNumber}; FeatureBitset const noAMMAndNumber{ @@ -5646,7 +5646,7 @@ private: testcase("Auto Delete"); using namespace jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; { Env env( @@ -6306,7 +6306,7 @@ private: { testcase("Fix Default Inner Object"); using namespace jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; auto test = [&](FeatureBitset features, TER const& err1, @@ -7043,7 +7043,7 @@ private: {{xrpPool, iouPool}}, 889, std::nullopt, - {jtx::supported_amendments() | fixAMMv1_1}); + {jtx::testable_amendments() | fixAMMv1_1}); } void @@ -7322,7 +7322,8 @@ private: } // If featureAMMClawback is enabled, AMMCreate is allowed for // clawback-enabled issuer. Clawback from the AMM Account is not - // allowed, which will return tecAMM_ACCOUNT. We can only use + // allowed, which will return tecAMM_ACCOUNT or tecPSEUDO_ACCOUNT, + // depending on whether SingleAssetVault is enabled. We can only use // AMMClawback transaction to claw back from AMM Account. else { @@ -7333,13 +7334,16 @@ private: // By doing this, we make the clawback transaction's Amount field's // subfield `issuer` to be the AMM account, which means // we are clawing back from an AMM account. This should return an - // tecAMM_ACCOUNT error because regular Clawback transaction is not + // error because regular Clawback transaction is not // allowed for clawing back from an AMM account. Please notice the // `issuer` subfield represents the account being clawed back, which // is confusing. + auto const error = features[featureSingleAssetVault] + ? ter{tecPSEUDO_ACCOUNT} + : ter{tecAMM_ACCOUNT}; Issue usd(USD.issue().currency, amm.ammAccount()); auto amount = amountFromString(usd, "10"); - env(claw(gw, amount), ter(tecAMM_ACCOUNT)); + env(claw(gw, amount), error); } } @@ -7513,10 +7517,10 @@ private: }; testCase( - "tecDUPLICATE", supported_amendments() - featureSingleAssetVault); + "tecDUPLICATE", testable_amendments() - featureSingleAssetVault); testCase( "terADDRESS_COLLISION", - supported_amendments() | featureSingleAssetVault); + testable_amendments() | featureSingleAssetVault); } void @@ -7894,7 +7898,7 @@ private: void run() override { - FeatureBitset const all{jtx::supported_amendments()}; + FeatureBitset const all{jtx::testable_amendments()}; testInvalidInstance(); testInstanceCreate(); testInvalidDeposit(all); @@ -7945,6 +7949,8 @@ private: testLPTokenBalance(all - fixAMMv1_3); testLPTokenBalance(all - fixAMMv1_1 - fixAMMv1_3); testAMMClawback(all); + testAMMClawback(all - featureSingleAssetVault); + testAMMClawback(all - featureAMMClawback - featureSingleAssetVault); testAMMClawback(all - featureAMMClawback); testAMMClawback(all - fixAMMv1_1 - fixAMMv1_3 - featureAMMClawback); testAMMDepositWithFrozenAssets(all); diff --git a/src/test/app/AccountDelete_test.cpp b/src/test/app/AccountDelete_test.cpp index 1ac0256dcb..f7c4ddc509 100644 --- a/src/test/app/AccountDelete_test.cpp +++ b/src/test/app/AccountDelete_test.cpp @@ -292,7 +292,7 @@ public: // o New-styled PayChannels with the backlink. // So we start the test using old-style PayChannels. Then we pass // the amendment to get new-style PayChannels. - Env env{*this, supported_amendments() - fixPayChanRecipientOwnerDir}; + Env env{*this, testable_amendments() - fixPayChanRecipientOwnerDir}; Account const alice("alice"); Account const becky("becky"); Account const gw("gw"); @@ -461,7 +461,7 @@ public: // We need an old-style PayChannel that doesn't provide a backlink // from the destination. So don't enable the amendment with that fix. - Env env{*this, supported_amendments() - fixPayChanRecipientOwnerDir}; + Env env{*this, testable_amendments() - fixPayChanRecipientOwnerDir}; Account const alice("alice"); Account const becky("becky"); @@ -536,7 +536,7 @@ public: testcase("Amendment enable"); - Env env{*this, supported_amendments() - featureDeletableAccounts}; + Env env{*this, testable_amendments() - featureDeletableAccounts}; Account const alice("alice"); Account const becky("becky"); @@ -1128,7 +1128,7 @@ public: Account const becky{"becky"}; Account const carol{"carol"}; - Env env{*this, supported_amendments() - featureCredentials}; + Env env{*this, testable_amendments() - featureCredentials}; env.fund(XRP(100000), alice, becky, carol); env.close(); diff --git a/src/test/app/AmendmentTable_test.cpp b/src/test/app/AmendmentTable_test.cpp index 5ba820da95..407b2fafe1 100644 --- a/src/test/app/AmendmentTable_test.cpp +++ b/src/test/app/AmendmentTable_test.cpp @@ -1288,7 +1288,7 @@ public: void run() override { - FeatureBitset const all{test::jtx::supported_amendments()}; + FeatureBitset const all{test::jtx::testable_amendments()}; FeatureBitset const fixMajorityCalc{fixAmendmentMajorityCalc}; testConstruct(); diff --git a/src/test/app/Batch_test.cpp b/src/test/app/Batch_test.cpp index 6ce95c56d0..c8fcc4092b 100644 --- a/src/test/app/Batch_test.cpp +++ b/src/test/app/Batch_test.cpp @@ -4164,7 +4164,7 @@ public: run() override { using namespace test::jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); testWithFeats(sa); } }; diff --git a/src/test/app/Check_test.cpp b/src/test/app/Check_test.cpp index 99b0c8dba3..be38b22313 100644 --- a/src/test/app/Check_test.cpp +++ b/src/test/app/Check_test.cpp @@ -2720,7 +2720,7 @@ public: run() override { using namespace test::jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); testWithFeats(sa - featureCheckCashMakesTrustLine); testWithFeats(sa - disallowIncoming); testWithFeats(sa); diff --git a/src/test/app/Clawback_test.cpp b/src/test/app/Clawback_test.cpp index d41f6de556..adfe80133a 100644 --- a/src/test/app/Clawback_test.cpp +++ b/src/test/app/Clawback_test.cpp @@ -949,7 +949,7 @@ public: run() override { using namespace test::jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; testWithFeats(all - featureMPTokensV1); testWithFeats(all); diff --git a/src/test/app/Credentials_test.cpp b/src/test/app/Credentials_test.cpp index fa6505e926..54826cbb12 100644 --- a/src/test/app/Credentials_test.cpp +++ b/src/test/app/Credentials_test.cpp @@ -1090,7 +1090,7 @@ struct Credentials_test : public beast::unit_test::suite run() override { using namespace test::jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; testSuccessful(all); testCredentialsDelete(all); testCreateFailed(all); diff --git a/src/test/app/CrossingLimits_test.cpp b/src/test/app/CrossingLimits_test.cpp index ff4650a1f8..6e76936199 100644 --- a/src/test/app/CrossingLimits_test.cpp +++ b/src/test/app/CrossingLimits_test.cpp @@ -522,7 +522,7 @@ public: testOfferOverflow(features); }; using namespace jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); testAll(sa); testAll(sa - featureFlowSortStrands); testAll(sa - featurePermissionedDEX); diff --git a/src/test/app/DID_test.cpp b/src/test/app/DID_test.cpp index c885ed0861..1f28af2d6a 100644 --- a/src/test/app/DID_test.cpp +++ b/src/test/app/DID_test.cpp @@ -390,7 +390,7 @@ struct DID_test : public beast::unit_test::suite run() override { using namespace test::jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; FeatureBitset const emptyDID{fixEmptyDID}; testEnabled(all); testAccountReserve(all); diff --git a/src/test/app/Delegate_test.cpp b/src/test/app/Delegate_test.cpp index ca13e4f4cd..179532140d 100644 --- a/src/test/app/Delegate_test.cpp +++ b/src/test/app/Delegate_test.cpp @@ -31,7 +31,7 @@ class Delegate_test : public beast::unit_test::suite testcase("test featurePermissionDelegation not enabled"); using namespace jtx; - Env env{*this, supported_amendments() - featurePermissionDelegation}; + Env env{*this, testable_amendments() - featurePermissionDelegation}; Account gw{"gateway"}; Account alice{"alice"}; Account bob{"bob"}; diff --git a/src/test/app/DeliverMin_test.cpp b/src/test/app/DeliverMin_test.cpp index 83d7c4a1b9..a9373fb002 100644 --- a/src/test/app/DeliverMin_test.cpp +++ b/src/test/app/DeliverMin_test.cpp @@ -142,7 +142,7 @@ public: run() override { using namespace jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); test_convert_all_of_an_asset(sa - featurePermissionedDEX); test_convert_all_of_an_asset(sa); } diff --git a/src/test/app/DepositAuth_test.cpp b/src/test/app/DepositAuth_test.cpp index 6f314e3a79..ffe8c4448b 100644 --- a/src/test/app/DepositAuth_test.cpp +++ b/src/test/app/DepositAuth_test.cpp @@ -53,7 +53,7 @@ struct DepositAuth_test : public beast::unit_test::suite { // featureDepositAuth is disabled. - Env env(*this, supported_amendments() - featureDepositAuth); + Env env(*this, testable_amendments() - featureDepositAuth); env.fund(XRP(10000), alice); // Note that, to support old behavior, invalid flags are ignored. @@ -352,27 +352,27 @@ struct DepositAuth_test : public beast::unit_test::suite auto const noRippleNext = i & 0x2; auto const withDepositAuth = i & 0x4; testIssuer( - supported_amendments() | featureDepositAuth, + testable_amendments() | featureDepositAuth, noRipplePrev, noRippleNext, withDepositAuth); if (!withDepositAuth) testIssuer( - supported_amendments() - featureDepositAuth, + testable_amendments() - featureDepositAuth, noRipplePrev, noRippleNext, withDepositAuth); testNonIssuer( - supported_amendments() | featureDepositAuth, + testable_amendments() | featureDepositAuth, noRipplePrev, noRippleNext, withDepositAuth); if (!withDepositAuth) testNonIssuer( - supported_amendments() - featureDepositAuth, + testable_amendments() - featureDepositAuth, noRipplePrev, noRippleNext, withDepositAuth); @@ -420,7 +420,7 @@ struct DepositPreauth_test : public beast::unit_test::suite Account const becky{"becky"}; { // featureDepositPreauth is disabled. - Env env(*this, supported_amendments() - featureDepositPreauth); + Env env(*this, testable_amendments() - featureDepositPreauth); env.fund(XRP(10000), alice, becky); env.close(); @@ -830,7 +830,7 @@ struct DepositPreauth_test : public beast::unit_test::suite { testcase("Payment failure with disabled credentials rule."); - Env env(*this, supported_amendments() - featureCredentials); + Env env(*this, testable_amendments() - featureCredentials); env.fund(XRP(5000), issuer, bob, alice); env.close(); @@ -1563,7 +1563,7 @@ struct DepositPreauth_test : public beast::unit_test::suite { testEnable(); testInvalid(); - auto const supported{jtx::supported_amendments()}; + auto const supported{jtx::testable_amendments()}; testPayment(supported - featureDepositPreauth - featureCredentials); testPayment(supported - featureDepositPreauth); testPayment(supported - featureCredentials); diff --git a/src/test/app/Discrepancy_test.cpp b/src/test/app/Discrepancy_test.cpp index ab8d5a605f..da41969885 100644 --- a/src/test/app/Discrepancy_test.cpp +++ b/src/test/app/Discrepancy_test.cpp @@ -146,7 +146,7 @@ public: run() override { using namespace test::jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); testXRPDiscrepancy(sa - featurePermissionedDEX); testXRPDiscrepancy(sa); } diff --git a/src/test/app/EscrowToken_test.cpp b/src/test/app/EscrowToken_test.cpp index 6ba8c48c93..e81064c825 100644 --- a/src/test/app/EscrowToken_test.cpp +++ b/src/test/app/EscrowToken_test.cpp @@ -3875,7 +3875,7 @@ public: run() override { using namespace test::jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; testIOUWithFeats(all); testMPTWithFeats(all); } diff --git a/src/test/app/Escrow_test.cpp b/src/test/app/Escrow_test.cpp index 21ef70a86e..3eaf0f13ea 100644 --- a/src/test/app/Escrow_test.cpp +++ b/src/test/app/Escrow_test.cpp @@ -294,7 +294,7 @@ struct Escrow_test : public beast::unit_test::suite { testcase("Implied Finish Time (without fix1571)"); - Env env(*this, supported_amendments() - fix1571); + Env env(*this, testable_amendments() - fix1571); auto const baseFee = env.current()->fees().base; env.fund(XRP(5000), "alice", "bob", "carol"); env.close(); @@ -1715,7 +1715,7 @@ public: run() override { using namespace test::jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; testWithFeats(all); testWithFeats(all - featureTokenEscrow); } diff --git a/src/test/app/FixNFTokenPageLinks_test.cpp b/src/test/app/FixNFTokenPageLinks_test.cpp index f87d70aacf..a54e889960 100644 --- a/src/test/app/FixNFTokenPageLinks_test.cpp +++ b/src/test/app/FixNFTokenPageLinks_test.cpp @@ -139,7 +139,7 @@ class FixNFTokenPageLinks_test : public beast::unit_test::suite { // Verify that the LedgerStateFix transaction is disabled // without the fixNFTokenPageLinks amendment. - Env env{*this, supported_amendments() - fixNFTokenPageLinks}; + Env env{*this, testable_amendments() - fixNFTokenPageLinks}; env.fund(XRP(1000), alice); auto const linkFixFee = drops(env.current()->fees().increment); @@ -148,7 +148,7 @@ class FixNFTokenPageLinks_test : public beast::unit_test::suite ter(temDISABLED)); } - Env env{*this, supported_amendments()}; + Env env{*this, testable_amendments()}; env.fund(XRP(1000), alice); std::uint32_t const ticketSeq = env.seq(alice); env(ticket::create(alice, 1)); @@ -206,7 +206,7 @@ class FixNFTokenPageLinks_test : public beast::unit_test::suite Account const alice("alice"); - Env env{*this, supported_amendments()}; + Env env{*this, testable_amendments()}; env.fund(XRP(1000), alice); // These cases all return the same TER code, but they exercise @@ -259,7 +259,7 @@ class FixNFTokenPageLinks_test : public beast::unit_test::suite Account const carol("carol"); Account const daria("daria"); - Env env{*this, supported_amendments() - fixNFTokenPageLinks}; + Env env{*this, testable_amendments() - fixNFTokenPageLinks}; env.fund(XRP(1000), alice, bob, carol, daria); //********************************************************************** diff --git a/src/test/app/Flow_test.cpp b/src/test/app/Flow_test.cpp index 0953b6f44f..0f40d70b57 100644 --- a/src/test/app/Flow_test.cpp +++ b/src/test/app/Flow_test.cpp @@ -1194,8 +1194,8 @@ struct Flow_test : public beast::unit_test::suite { auto const feats = [&withFix]() -> FeatureBitset { if (withFix) - return supported_amendments(); - return supported_amendments() - FeatureBitset{fix1781}; + return testable_amendments(); + return testable_amendments() - FeatureBitset{fix1781}; }(); { // Payment path starting with XRP @@ -1332,7 +1332,7 @@ struct Flow_test : public beast::unit_test::suite testRIPD1449(); using namespace jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); testWithFeats(sa - featurePermissionedDEX); testWithFeats(sa); testEmptyStrand(sa); @@ -1345,7 +1345,7 @@ struct Flow_manual_test : public Flow_test run() override { using namespace jtx; - auto const all = supported_amendments(); + auto const all = testable_amendments(); FeatureBitset const f1513{fix1513}; FeatureBitset const permDex{featurePermissionedDEX}; diff --git a/src/test/app/Freeze_test.cpp b/src/test/app/Freeze_test.cpp index 8002aa2a3b..3bde3a30af 100644 --- a/src/test/app/Freeze_test.cpp +++ b/src/test/app/Freeze_test.cpp @@ -2094,7 +2094,7 @@ public: testNFTOffersWhenFreeze(features); }; using namespace test::jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); testAll( sa - featureDeepFreeze - featurePermissionedDEX - fixEnforceNFTokenTrustlineV2); diff --git a/src/test/app/LPTokenTransfer_test.cpp b/src/test/app/LPTokenTransfer_test.cpp index 96e621dccf..e95e974547 100644 --- a/src/test/app/LPTokenTransfer_test.cpp +++ b/src/test/app/LPTokenTransfer_test.cpp @@ -467,7 +467,7 @@ public: void run() override { - FeatureBitset const all{jtx::supported_amendments()}; + FeatureBitset const all{jtx::testable_amendments()}; for (auto const features : {all, all - fixFrozenLPTokenTransfer}) { diff --git a/src/test/app/LedgerMaster_test.cpp b/src/test/app/LedgerMaster_test.cpp index 19664616b1..828e4b09c2 100644 --- a/src/test/app/LedgerMaster_test.cpp +++ b/src/test/app/LedgerMaster_test.cpp @@ -124,7 +124,7 @@ public: run() override { using namespace test::jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; testWithFeats(all); } diff --git a/src/test/app/MPToken_test.cpp b/src/test/app/MPToken_test.cpp index deee217aa8..46b64e40f2 100644 --- a/src/test/app/MPToken_test.cpp +++ b/src/test/app/MPToken_test.cpp @@ -1428,7 +1428,7 @@ class MPToken_test : public beast::unit_test::suite testcase("DepositPreauth disabled featureCredentials"); { - Env env(*this, supported_amendments() - featureCredentials); + Env env(*this, testable_amendments() - featureCredentials); std::string const credIdx = "D007AE4B6E1274B4AF872588267B810C2F82716726351D1C7D38D3E5499FC6" @@ -2293,7 +2293,7 @@ public: run() override { using namespace test::jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; // MPTokenIssuanceCreate testCreateValidation(all - featureSingleAssetVault); diff --git a/src/test/app/MultiSign_test.cpp b/src/test/app/MultiSign_test.cpp index 8c1880c1a0..571ec33417 100644 --- a/src/test/app/MultiSign_test.cpp +++ b/src/test/app/MultiSign_test.cpp @@ -1478,7 +1478,7 @@ public: Account const cheri{"cheri", KeyType::secp256k1}; Account const daria{"daria", KeyType::ed25519}; - Env env{*this, supported_amendments() - featureMultiSignReserve}; + Env env{*this, testable_amendments() - featureMultiSignReserve}; env.fund(XRP(1000), alice, becky, cheri, daria); env.close(); @@ -1729,7 +1729,7 @@ public: run() override { using namespace jtx; - auto const all = supported_amendments(); + auto const all = testable_amendments(); // The reserve required on a signer list changes based on // featureMultiSignReserve. Limits on the number of signers diff --git a/src/test/app/NFTokenAuth_test.cpp b/src/test/app/NFTokenAuth_test.cpp index 9558a03f7a..1a59dc579a 100644 --- a/src/test/app/NFTokenAuth_test.cpp +++ b/src/test/app/NFTokenAuth_test.cpp @@ -599,7 +599,7 @@ public: run() override { using namespace test::jtx; - static FeatureBitset const all{supported_amendments()}; + static FeatureBitset const all{testable_amendments()}; static std::array const features = { all - fixEnforceNFTokenTrustlineV2, all}; diff --git a/src/test/app/NFTokenBurn_test.cpp b/src/test/app/NFTokenBurn_test.cpp index a970b11789..21b0a1ffd8 100644 --- a/src/test/app/NFTokenBurn_test.cpp +++ b/src/test/app/NFTokenBurn_test.cpp @@ -1385,7 +1385,7 @@ protected: run(std::uint32_t instance, bool last = false) { using namespace test::jtx; - static FeatureBitset const all{supported_amendments()}; + static FeatureBitset const all{testable_amendments()}; static FeatureBitset const fixNFTV1_2{fixNonFungibleTokensV1_2}; static FeatureBitset const fixNFTDir{fixNFTokenDirV1}; static FeatureBitset const fixNFTRemint{fixNFTokenRemint}; diff --git a/src/test/app/NFTokenDir_test.cpp b/src/test/app/NFTokenDir_test.cpp index fe21e02739..df40781590 100644 --- a/src/test/app/NFTokenDir_test.cpp +++ b/src/test/app/NFTokenDir_test.cpp @@ -1100,7 +1100,7 @@ public: run() override { using namespace test::jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; FeatureBitset const fixNFTDir{ fixNFTokenDirV1, featureNonFungibleTokensV1_1}; diff --git a/src/test/app/NFToken_test.cpp b/src/test/app/NFToken_test.cpp index 41bcc673d5..b79ebf3c40 100644 --- a/src/test/app/NFToken_test.cpp +++ b/src/test/app/NFToken_test.cpp @@ -8075,7 +8075,7 @@ public: run(std::uint32_t instance, bool last = false) { using namespace test::jtx; - static FeatureBitset const all{supported_amendments()}; + static FeatureBitset const all{testable_amendments()}; static FeatureBitset const fixNFTDir{fixNFTokenDirV1}; static std::array const feats{ diff --git a/src/test/app/Offer_test.cpp b/src/test/app/Offer_test.cpp index 1c877fedef..96f68fb2ad 100644 --- a/src/test/app/Offer_test.cpp +++ b/src/test/app/Offer_test.cpp @@ -5365,7 +5365,7 @@ public: run(std::uint32_t instance, bool last = false) { using namespace jtx; - static FeatureBitset const all{supported_amendments()}; + static FeatureBitset const all{testable_amendments()}; static FeatureBitset const takerDryOffer{fixTakerDryOfferRemoval}; static FeatureBitset const rmSmallIncreasedQOffers{ fixRmSmallIncreasedQOffers}; @@ -5449,7 +5449,7 @@ class Offer_manual_test : public OfferBaseUtil_test run() override { using namespace jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; FeatureBitset const f1513{fix1513}; FeatureBitset const immediateOfferKilled{featureImmediateOfferKilled}; FeatureBitset const takerDryOffer{fixTakerDryOfferRemoval}; diff --git a/src/test/app/Oracle_test.cpp b/src/test/app/Oracle_test.cpp index a968970395..aaa7f9a746 100644 --- a/src/test/app/Oracle_test.cpp +++ b/src/test/app/Oracle_test.cpp @@ -783,7 +783,7 @@ private: testcase("Amendment"); using namespace jtx; - auto const features = supported_amendments() - featurePriceOracle; + auto const features = testable_amendments() - featurePriceOracle; Account const owner("owner"); Env env(*this, features); auto const baseFee = @@ -806,7 +806,7 @@ public: run() override { using namespace jtx; - auto const all = supported_amendments(); + auto const all = testable_amendments(); testInvalidSet(); testInvalidDelete(); testCreate(); diff --git a/src/test/app/PayChan_test.cpp b/src/test/app/PayChan_test.cpp index 7cb1542453..3a5d3d6ff5 100644 --- a/src/test/app/PayChan_test.cpp +++ b/src/test/app/PayChan_test.cpp @@ -1035,7 +1035,7 @@ struct PayChan_test : public beast::unit_test::suite { // Credentials amendment not enabled - Env env(*this, supported_amendments() - featureCredentials); + Env env(*this, testable_amendments() - featureCredentials); env.fund(XRP(5000), "alice", "bob"); env.close(); @@ -2344,7 +2344,7 @@ public: run() override { using namespace test::jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; testWithFeats(all - disallowIncoming); testWithFeats(all); testDepositAuthCreds(); diff --git a/src/test/app/PayStrand_test.cpp b/src/test/app/PayStrand_test.cpp index fe9c11a318..936fe403d4 100644 --- a/src/test/app/PayStrand_test.cpp +++ b/src/test/app/PayStrand_test.cpp @@ -1267,7 +1267,7 @@ struct PayStrand_test : public beast::unit_test::suite run() override { using namespace jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); testToStrand(sa - featurePermissionedDEX); testToStrand(sa); diff --git a/src/test/app/PermissionedDEX_test.cpp b/src/test/app/PermissionedDEX_test.cpp index f2d40140cd..3fd3a35f45 100644 --- a/src/test/app/PermissionedDEX_test.cpp +++ b/src/test/app/PermissionedDEX_test.cpp @@ -1551,7 +1551,7 @@ public: void run() override { - FeatureBitset const all{jtx::supported_amendments()}; + FeatureBitset const all{jtx::testable_amendments()}; // Test domain offer (w/o hyrbid) testOfferCreate(all); diff --git a/src/test/app/PermissionedDomains_test.cpp b/src/test/app/PermissionedDomains_test.cpp index e33a88fa08..31e34ccf17 100644 --- a/src/test/app/PermissionedDomains_test.cpp +++ b/src/test/app/PermissionedDomains_test.cpp @@ -53,9 +53,9 @@ exceptionExpected(Env& env, Json::Value const& jv) class PermissionedDomains_test : public beast::unit_test::suite { FeatureBitset withoutFeature_{ - supported_amendments() - featurePermissionedDomains}; + testable_amendments() - featurePermissionedDomains}; FeatureBitset withFeature_{ - supported_amendments() // + testable_amendments() // | featurePermissionedDomains | featureCredentials}; // Verify that each tx type can execute if the feature is enabled. @@ -81,7 +81,7 @@ class PermissionedDomains_test : public beast::unit_test::suite void testCredentialsDisabled() { - auto amendments = supported_amendments(); + auto amendments = testable_amendments(); amendments.set(featurePermissionedDomains); amendments.reset(featureCredentials); testcase("Credentials disabled"); diff --git a/src/test/app/PseudoTx_test.cpp b/src/test/app/PseudoTx_test.cpp index d96828a50b..53adf795c2 100644 --- a/src/test/app/PseudoTx_test.cpp +++ b/src/test/app/PseudoTx_test.cpp @@ -115,7 +115,7 @@ struct PseudoTx_test : public beast::unit_test::suite run() override { using namespace test::jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; FeatureBitset const xrpFees{featureXRPFees}; testPrevented(all - featureXRPFees); diff --git a/src/test/app/ReducedOffer_test.cpp b/src/test/app/ReducedOffer_test.cpp index 546a07d93e..5142aaab0e 100644 --- a/src/test/app/ReducedOffer_test.cpp +++ b/src/test/app/ReducedOffer_test.cpp @@ -82,8 +82,8 @@ public: // Make one test run without fixReducedOffersV1 and one with. for (FeatureBitset features : - {supported_amendments() - fixReducedOffersV1, - supported_amendments() | fixReducedOffersV1}) + {testable_amendments() - fixReducedOffersV1, + testable_amendments() | fixReducedOffersV1}) { Env env{*this, features}; @@ -238,8 +238,8 @@ public: // Make one test run without fixReducedOffersV1 and one with. for (FeatureBitset features : - {supported_amendments() - fixReducedOffersV1, - supported_amendments() | fixReducedOffersV1}) + {testable_amendments() - fixReducedOffersV1, + testable_amendments() | fixReducedOffersV1}) { // Make sure none of the offers we generate are under funded. Env env{*this, features}; @@ -401,8 +401,8 @@ public: // Make one test run without fixReducedOffersV1 and one with. for (FeatureBitset features : - {supported_amendments() - fixReducedOffersV1, - supported_amendments() | fixReducedOffersV1}) + {testable_amendments() - fixReducedOffersV1, + testable_amendments() | fixReducedOffersV1}) { Env env{*this, features}; @@ -509,8 +509,8 @@ public: // Make one test run without fixReducedOffersV1 and one with. for (FeatureBitset features : - {supported_amendments() - fixReducedOffersV1, - supported_amendments() | fixReducedOffersV1}) + {testable_amendments() - fixReducedOffersV1, + testable_amendments() | fixReducedOffersV1}) { Env env{*this, features}; @@ -639,8 +639,8 @@ public: // Make one test run without fixReducedOffersV2 and one with. for (FeatureBitset features : - {supported_amendments() - fixReducedOffersV2, - supported_amendments() | fixReducedOffersV2}) + {testable_amendments() - fixReducedOffersV2, + testable_amendments() | fixReducedOffersV2}) { // Make sure none of the offers we generate are under funded. Env env{*this, features}; diff --git a/src/test/app/SetAuth_test.cpp b/src/test/app/SetAuth_test.cpp index 28a5b3be91..4c63560770 100644 --- a/src/test/app/SetAuth_test.cpp +++ b/src/test/app/SetAuth_test.cpp @@ -74,7 +74,7 @@ struct SetAuth_test : public beast::unit_test::suite run() override { using namespace jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); testAuth(sa - featurePermissionedDEX); testAuth(sa); } diff --git a/src/test/app/SetRegularKey_test.cpp b/src/test/app/SetRegularKey_test.cpp index 6a3a5ff2a9..78b75fc458 100644 --- a/src/test/app/SetRegularKey_test.cpp +++ b/src/test/app/SetRegularKey_test.cpp @@ -32,7 +32,7 @@ public: using namespace test::jtx; testcase("Set regular key"); - Env env{*this, supported_amendments() - fixMasterKeyAsRegularKey}; + Env env{*this, testable_amendments() - fixMasterKeyAsRegularKey}; Account const alice("alice"); Account const bob("bob"); env.fund(XRP(10000), alice, bob); @@ -72,7 +72,7 @@ public: using namespace test::jtx; testcase("Set regular key"); - Env env{*this, supported_amendments() | fixMasterKeyAsRegularKey}; + Env env{*this, testable_amendments() | fixMasterKeyAsRegularKey}; Account const alice("alice"); Account const bob("bob"); env.fund(XRP(10000), alice, bob); @@ -109,7 +109,7 @@ public: // See https://ripplelabs.atlassian.net/browse/RIPD-1721. testcase( "Set regular key to master key (before fixMasterKeyAsRegularKey)"); - Env env{*this, supported_amendments() - fixMasterKeyAsRegularKey}; + Env env{*this, testable_amendments() - fixMasterKeyAsRegularKey}; Account const alice("alice"); env.fund(XRP(10000), alice); @@ -139,7 +139,7 @@ public: testcase( "Set regular key to master key (after fixMasterKeyAsRegularKey)"); - Env env{*this, supported_amendments() | fixMasterKeyAsRegularKey}; + Env env{*this, testable_amendments() | fixMasterKeyAsRegularKey}; Account const alice("alice"); env.fund(XRP(10000), alice); diff --git a/src/test/app/SetTrust_test.cpp b/src/test/app/SetTrust_test.cpp index 9b4048bf9c..18457b5faf 100644 --- a/src/test/app/SetTrust_test.cpp +++ b/src/test/app/SetTrust_test.cpp @@ -648,7 +648,7 @@ public: run() override { using namespace test::jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); testWithFeats(sa - disallowIncoming); testWithFeats(sa); } diff --git a/src/test/app/TheoreticalQuality_test.cpp b/src/test/app/TheoreticalQuality_test.cpp index dcffd810ed..a8713ec69a 100644 --- a/src/test/app/TheoreticalQuality_test.cpp +++ b/src/test/app/TheoreticalQuality_test.cpp @@ -359,7 +359,7 @@ public: // Tests are sped up by a factor of 2 if a new environment isn't created // on every iteration. - Env env(*this, supported_amendments()); + Env env(*this, testable_amendments()); for (int i = 0; i < numTestIterations; ++i) { auto const iterAsStr = std::to_string(i); @@ -434,7 +434,7 @@ public: // Speed up tests by creating the environment outside the loop // (factor of 2 speedup on the DirectStep tests) - Env env(*this, supported_amendments()); + Env env(*this, testable_amendments()); for (int i = 0; i < numTestIterations; ++i) { auto const iterAsStr = std::to_string(i); diff --git a/src/test/app/Ticket_test.cpp b/src/test/app/Ticket_test.cpp index dd83e3036e..f8ac64679e 100644 --- a/src/test/app/Ticket_test.cpp +++ b/src/test/app/Ticket_test.cpp @@ -385,7 +385,7 @@ class Ticket_test : public beast::unit_test::suite testcase("Feature Not Enabled"); using namespace test::jtx; - Env env{*this, supported_amendments() - featureTicketBatch}; + Env env{*this, testable_amendments() - featureTicketBatch}; env(ticket::create(env.master, 1), ter(temDISABLED)); env.close(); @@ -933,7 +933,7 @@ class Ticket_test : public beast::unit_test::suite // Try the test without featureTicketBatch enabled. using namespace test::jtx; { - Env env{*this, supported_amendments() - featureTicketBatch}; + Env env{*this, testable_amendments() - featureTicketBatch}; Account alice{"alice"}; env.fund(XRP(10000), alice); @@ -957,7 +957,7 @@ class Ticket_test : public beast::unit_test::suite } // Try the test with featureTicketBatch enabled. { - Env env{*this, supported_amendments()}; + Env env{*this, testable_amendments()}; Account alice{"alice"}; env.fund(XRP(10000), alice); diff --git a/src/test/app/TrustAndBalance_test.cpp b/src/test/app/TrustAndBalance_test.cpp index d57e8ec418..f39d9e0313 100644 --- a/src/test/app/TrustAndBalance_test.cpp +++ b/src/test/app/TrustAndBalance_test.cpp @@ -480,7 +480,7 @@ public: }; using namespace test::jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); testWithFeatures(sa - featurePermissionedDEX); testWithFeatures(sa); } diff --git a/src/test/app/Vault_test.cpp b/src/test/app/Vault_test.cpp index 25e486f1a2..ce97eff24f 100644 --- a/src/test/app/Vault_test.cpp +++ b/src/test/app/Vault_test.cpp @@ -340,7 +340,7 @@ class Vault_test : public beast::unit_test::suite Account const& owner, Account const& depositor, Account const& charlie)> setup) { - Env env{*this, supported_amendments() | featureSingleAssetVault}; + Env env{*this, testable_amendments() | featureSingleAssetVault}; Account issuer{"issuer"}; Account owner{"owner"}; Account depositor{"depositor"}; @@ -416,7 +416,7 @@ class Vault_test : public beast::unit_test::suite struct CaseArgs { FeatureBitset features = - supported_amendments() | featureSingleAssetVault; + testable_amendments() | featureSingleAssetVault; }; auto testCase = [&, this]( @@ -494,7 +494,7 @@ class Vault_test : public beast::unit_test::suite env(tx, ter{temDISABLED}); } }, - {.features = supported_amendments() - featureSingleAssetVault}); + {.features = testable_amendments() - featureSingleAssetVault}); testCase([&](Env& env, Account const& issuer, @@ -625,7 +625,7 @@ class Vault_test : public beast::unit_test::suite env(tx, ter{temDISABLED}); } }, - {.features = (supported_amendments() | featureSingleAssetVault) - + {.features = (testable_amendments() | featureSingleAssetVault) - featurePermissionedDomains}); testCase([&](Env& env, @@ -950,7 +950,7 @@ class Vault_test : public beast::unit_test::suite Account const& depositor, Asset const& asset, Vault& vault)> test) { - Env env{*this, supported_amendments() | featureSingleAssetVault}; + Env env{*this, testable_amendments() | featureSingleAssetVault}; Account issuer{"issuer"}; Account owner{"owner"}; Account depositor{"depositor"}; @@ -1092,8 +1092,7 @@ class Vault_test : public beast::unit_test::suite { { testcase("IOU fail create frozen"); - Env env{ - *this, supported_amendments() | featureSingleAssetVault}; + Env env{*this, testable_amendments() | featureSingleAssetVault}; Account issuer{"issuer"}; Account owner{"owner"}; env.fund(XRP(1000), issuer, owner); @@ -1112,8 +1111,7 @@ class Vault_test : public beast::unit_test::suite { testcase("IOU fail create no ripling"); - Env env{ - *this, supported_amendments() | featureSingleAssetVault}; + Env env{*this, testable_amendments() | featureSingleAssetVault}; Account issuer{"issuer"}; Account owner{"owner"}; env.fund(XRP(1000), issuer, owner); @@ -1131,8 +1129,7 @@ class Vault_test : public beast::unit_test::suite { testcase("IOU no issuer"); - Env env{ - *this, supported_amendments() | featureSingleAssetVault}; + Env env{*this, testable_amendments() | featureSingleAssetVault}; Account issuer{"issuer"}; Account owner{"owner"}; env.fund(XRP(1000), owner); @@ -1151,7 +1148,7 @@ class Vault_test : public beast::unit_test::suite { testcase("IOU fail create vault for AMM LPToken"); - Env env{*this, supported_amendments() | featureSingleAssetVault}; + Env env{*this, testable_amendments() | featureSingleAssetVault}; Account const gw("gateway"); Account const alice("alice"); Account const carol("carol"); @@ -1202,7 +1199,7 @@ class Vault_test : public beast::unit_test::suite { using namespace test::jtx; - Env env{*this, supported_amendments() | featureSingleAssetVault}; + Env env{*this, testable_amendments() | featureSingleAssetVault}; Account issuer{"issuer"}; Account owner{"owner"}; Account depositor{"depositor"}; @@ -1224,7 +1221,7 @@ class Vault_test : public beast::unit_test::suite { using namespace test::jtx; - Env env{*this, supported_amendments() | featureSingleAssetVault}; + Env env{*this, testable_amendments() | featureSingleAssetVault}; Account issuer{"issuer"}; Account owner{"owner"}; Account depositor{"depositor"}; @@ -1350,7 +1347,7 @@ class Vault_test : public beast::unit_test::suite Vault& vault, MPTTester& mptt)> test, CaseArgs args = {}) { - Env env{*this, supported_amendments() | featureSingleAssetVault}; + Env env{*this, testable_amendments() | featureSingleAssetVault}; Account issuer{"issuer"}; Account owner{"owner"}; Account depositor{"depositor"}; @@ -1746,7 +1743,7 @@ class Vault_test : public beast::unit_test::suite { testcase("MPT shares to a vault"); - Env env{*this, supported_amendments() | featureSingleAssetVault}; + Env env{*this, testable_amendments() | featureSingleAssetVault}; Account owner{"owner"}; Account issuer{"issuer"}; env.fund(XRP(1000000), owner, issuer); @@ -1795,8 +1792,7 @@ class Vault_test : public beast::unit_test::suite std::function issuanceId, std::function vaultBalance)> test) { - Env env{ - *this, supported_amendments() | featureSingleAssetVault}; + Env env{*this, testable_amendments() | featureSingleAssetVault}; Account const owner{"owner"}; Account const issuer{"issuer"}; Account const charlie{"charlie"}; @@ -2241,7 +2237,7 @@ class Vault_test : public beast::unit_test::suite testcase("private vault"); - Env env{*this, supported_amendments() | featureSingleAssetVault}; + Env env{*this, testable_amendments() | featureSingleAssetVault}; Account issuer{"issuer"}; Account owner{"owner"}; Account depositor{"depositor"}; @@ -2526,7 +2522,7 @@ class Vault_test : public beast::unit_test::suite testcase("private XRP vault"); - Env env{*this, supported_amendments() | featureSingleAssetVault}; + Env env{*this, testable_amendments() | featureSingleAssetVault}; Account owner{"owner"}; Account depositor{"depositor"}; Account alice{"charlie"}; @@ -2629,7 +2625,7 @@ class Vault_test : public beast::unit_test::suite using namespace test::jtx; testcase("failed pseudo-account allocation"); - Env env{*this, supported_amendments() | featureSingleAssetVault}; + Env env{*this, testable_amendments() | featureSingleAssetVault}; Account const owner{"owner"}; Vault vault{env}; env.fund(XRP(1000), owner); @@ -2658,7 +2654,7 @@ class Vault_test : public beast::unit_test::suite using namespace test::jtx; testcase("RPC"); - Env env{*this, supported_amendments() | featureSingleAssetVault}; + Env env{*this, testable_amendments() | featureSingleAssetVault}; Account const owner{"owner"}; Account const issuer{"issuer"}; Vault vault{env}; diff --git a/src/test/app/XChain_test.cpp b/src/test/app/XChain_test.cpp index 85cd636b3d..311ddda59b 100644 --- a/src/test/app/XChain_test.cpp +++ b/src/test/app/XChain_test.cpp @@ -192,7 +192,7 @@ struct SEnv }; // XEnv class used for XChain tests. The only difference with SEnv is that it -// funds some default accounts, and that it enables `supported_amendments() | +// funds some default accounts, and that it enables `testable_amendments() | // FeatureBitset{featureXChainBridge}` by default. // ----------------------------------------------------------------------------- template @@ -526,7 +526,7 @@ struct XChain_test : public beast::unit_test::suite, // coverage test: BridgeCreate::preflight() - create bridge when feature // disabled. { - Env env(*this, supported_amendments() - featureXChainBridge); + Env env(*this, testable_amendments() - featureXChainBridge); env(create_bridge(Account::master, jvb), ter(temDISABLED)); } diff --git a/src/test/app/tx/apply_test.cpp b/src/test/app/tx/apply_test.cpp index 44a2c10b4e..0f5ccf5a55 100644 --- a/src/test/app/tx/apply_test.cpp +++ b/src/test/app/tx/apply_test.cpp @@ -55,7 +55,7 @@ public: { test::jtx::Env no_fully_canonical( *this, - test::jtx::supported_amendments() - + test::jtx::testable_amendments() - featureRequireFullyCanonicalSig); Validity valid = checkValidity( @@ -71,7 +71,7 @@ public: { test::jtx::Env fully_canonical( - *this, test::jtx::supported_amendments()); + *this, test::jtx::testable_amendments()); Validity valid = checkValidity( fully_canonical.app().getHashRouter(), diff --git a/src/test/consensus/NegativeUNL_test.cpp b/src/test/consensus/NegativeUNL_test.cpp index 7eb05e68bb..56558f525f 100644 --- a/src/test/consensus/NegativeUNL_test.cpp +++ b/src/test/consensus/NegativeUNL_test.cpp @@ -227,7 +227,7 @@ class NegativeUNL_test : public beast::unit_test::suite testcase("Create UNLModify Tx and apply to ledgers"); - jtx::Env env(*this, jtx::supported_amendments() | featureNegativeUNL); + jtx::Env env(*this, jtx::testable_amendments() | featureNegativeUNL); std::vector publicKeys = createPublicKeys(3); // genesis ledger auto l = std::make_shared( @@ -526,7 +526,7 @@ class NegativeUNLNoAmendment_test : public beast::unit_test::suite { testcase("No negative UNL amendment"); - jtx::Env env(*this, jtx::supported_amendments() - featureNegativeUNL); + jtx::Env env(*this, jtx::testable_amendments() - featureNegativeUNL); std::vector publicKeys = createPublicKeys(1); // genesis ledger auto l = std::make_shared( @@ -582,7 +582,7 @@ struct NetworkHistory }; NetworkHistory(beast::unit_test::suite& suite, Parameter const& p) - : env(suite, jtx::supported_amendments() | featureNegativeUNL) + : env(suite, jtx::testable_amendments() | featureNegativeUNL) , param(p) , validations(env.app().getValidations()) { diff --git a/src/test/jtx/AMMTest.h b/src/test/jtx/AMMTest.h index 28b9affa8f..17011d7633 100644 --- a/src/test/jtx/AMMTest.h +++ b/src/test/jtx/AMMTest.h @@ -40,7 +40,7 @@ struct TestAMMArg std::optional> pool = std::nullopt; std::uint16_t tfee = 0; std::optional ter = std::nullopt; - std::vector features = {supported_amendments()}; + std::vector features = {testable_amendments()}; bool noLog = false; }; @@ -95,7 +95,7 @@ protected: std::optional> const& pool = std::nullopt, std::uint16_t tfee = 0, std::optional const& ter = std::nullopt, - std::vector const& features = {supported_amendments()}); + std::vector const& features = {testable_amendments()}); void testAMM( diff --git a/src/test/jtx/Env.h b/src/test/jtx/Env.h index 53417a6079..21a239e3d7 100644 --- a/src/test/jtx/Env.h +++ b/src/test/jtx/Env.h @@ -71,10 +71,10 @@ noripple(Account const& account, Args const&... args) } inline FeatureBitset -supported_amendments() +testable_amendments() { static FeatureBitset const ids = [] { - auto const& sa = ripple::detail::supportedAmendments(); + auto const& sa = allAmendments(); std::vector feats; feats.reserve(sa.size()); for (auto const& [s, vote] : sa) @@ -84,7 +84,7 @@ supported_amendments() feats.push_back(*f); else Throw( - "Unknown feature: " + s + " in supportedAmendments."); + "Unknown feature: " + s + " in allAmendments."); } return FeatureBitset(feats); }(); @@ -236,7 +236,7 @@ public: beast::severities::Severity thresh = beast::severities::kError) : Env(suite_, std::move(config), - supported_amendments(), + testable_amendments(), std::move(logs), thresh) { diff --git a/src/test/jtx/Env_test.cpp b/src/test/jtx/Env_test.cpp index f32343d6dd..2be20d6e33 100644 --- a/src/test/jtx/Env_test.cpp +++ b/src/test/jtx/Env_test.cpp @@ -265,7 +265,7 @@ public: { using namespace jtx; - Env env{*this, supported_amendments() | fixMasterKeyAsRegularKey}; + Env env{*this, testable_amendments() | fixMasterKeyAsRegularKey}; Account const alice("alice", KeyType::ed25519); Account const bob("bob", KeyType::secp256k1); Account const carol("carol"); @@ -776,7 +776,7 @@ public: { testcase("Env features"); using namespace jtx; - auto const supported = supported_amendments(); + auto const supported = testable_amendments(); // this finds a feature that is not in // the supported amendments list and tests that it can be @@ -827,7 +827,7 @@ public: } auto const missingSomeFeatures = - supported_amendments() - featureMultiSignReserve - featureFlow; + testable_amendments() - featureMultiSignReserve - featureFlow; BEAST_EXPECT(missingSomeFeatures.count() == (supported.count() - 2)); { // a Env supported_features_except is missing *only* those features @@ -887,7 +887,7 @@ public: // add a feature that is NOT in the supported amendments list // along with all supported amendments // the unsupported features should be enabled - Env env{*this, supported_amendments().set(*neverSupportedFeat)}; + Env env{*this, testable_amendments().set(*neverSupportedFeat)}; // this app will have all supported amendments and then the // one additional never supported feature flag diff --git a/src/test/jtx/impl/xchain_bridge.cpp b/src/test/jtx/impl/xchain_bridge.cpp index 86e9deda7c..6f167d7508 100644 --- a/src/test/jtx/impl/xchain_bridge.cpp +++ b/src/test/jtx/impl/xchain_bridge.cpp @@ -389,7 +389,7 @@ XChainBridgeObjects::XChainBridgeObjects() bridge_rpc(mcDoor, xrpIssue(), Account::master, xrpIssue())) , jvb(bridge(mcDoor, xrpIssue(), Account::master, xrpIssue())) , jvub(bridge(mcuDoor, xrpIssue(), Account::master, xrpIssue())) - , features(supported_amendments() | FeatureBitset{featureXChainBridge}) + , features(testable_amendments() | FeatureBitset{featureXChainBridge}) , signers([] { constexpr int numSigners = UT_XCHAIN_DEFAULT_NUM_SIGNERS; std::vector result; diff --git a/src/test/ledger/BookDirs_test.cpp b/src/test/ledger/BookDirs_test.cpp index 45cd7e332d..52b618e9a0 100644 --- a/src/test/ledger/BookDirs_test.cpp +++ b/src/test/ledger/BookDirs_test.cpp @@ -103,7 +103,7 @@ struct BookDirs_test : public beast::unit_test::suite run() override { using namespace jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); test_bookdir(sa - featurePermissionedDEX); test_bookdir(sa); } diff --git a/src/test/ledger/Directory_test.cpp b/src/test/ledger/Directory_test.cpp index 7aa6f149b8..9e8d40e0cc 100644 --- a/src/test/ledger/Directory_test.cpp +++ b/src/test/ledger/Directory_test.cpp @@ -421,7 +421,7 @@ struct Directory_test : public beast::unit_test::suite }; // fixPreviousTxnID is disabled. - Env env(*this, supported_amendments() - fixPreviousTxnID); + Env env(*this, testable_amendments() - fixPreviousTxnID); env.fund(XRP(10000), alice, gw); env.close(); env.trust(USD(1000), alice); diff --git a/src/test/ledger/Invariants_test.cpp b/src/test/ledger/Invariants_test.cpp index 6178b413d5..fadd9c0eae 100644 --- a/src/test/ledger/Invariants_test.cpp +++ b/src/test/ledger/Invariants_test.cpp @@ -78,7 +78,7 @@ class Invariants_test : public beast::unit_test::suite Preclose const& preclose = {}) { using namespace test::jtx; - FeatureBitset amendments = supported_amendments() | + FeatureBitset amendments = testable_amendments() | featureInvariantsV1_1 | featureSingleAssetVault; Env env{*this, amendments}; diff --git a/src/test/ledger/PaymentSandbox_test.cpp b/src/test/ledger/PaymentSandbox_test.cpp index 7901cec364..26b06a0034 100644 --- a/src/test/ledger/PaymentSandbox_test.cpp +++ b/src/test/ledger/PaymentSandbox_test.cpp @@ -420,7 +420,7 @@ public: testBalanceHook(features); }; using namespace jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); testAll(sa - featurePermissionedDEX); testAll(sa); } diff --git a/src/test/rpc/AMMInfo_test.cpp b/src/test/rpc/AMMInfo_test.cpp index 1c54580aa7..a6e866b1c8 100644 --- a/src/test/rpc/AMMInfo_test.cpp +++ b/src/test/rpc/AMMInfo_test.cpp @@ -359,7 +359,7 @@ public: run() override { using namespace jtx; - auto const all = supported_amendments(); + auto const all = testable_amendments(); testErrors(); testSimpleRpc(); testVoteAndBid(all); diff --git a/src/test/rpc/AccountInfo_test.cpp b/src/test/rpc/AccountInfo_test.cpp index 0b41da2ded..18c8bf5a1c 100644 --- a/src/test/rpc/AccountInfo_test.cpp +++ b/src/test/rpc/AccountInfo_test.cpp @@ -710,7 +710,7 @@ public: testSignerListsV2(); FeatureBitset const allFeatures{ - ripple::test::jtx::supported_amendments()}; + ripple::test::jtx::testable_amendments()}; testAccountFlags(allFeatures); testAccountFlags(allFeatures - featureDisallowIncoming); testAccountFlags( diff --git a/src/test/rpc/AccountObjects_test.cpp b/src/test/rpc/AccountObjects_test.cpp index 7a48db73bd..546bbe8715 100644 --- a/src/test/rpc/AccountObjects_test.cpp +++ b/src/test/rpc/AccountObjects_test.cpp @@ -577,7 +577,7 @@ public: Account const gw{"gateway"}; auto const USD = gw["USD"]; - auto const features = supported_amendments() | featureXChainBridge | + auto const features = testable_amendments() | featureXChainBridge | featurePermissionedDomains; Env env(*this, features); diff --git a/src/test/rpc/AccountSet_test.cpp b/src/test/rpc/AccountSet_test.cpp index c056279bf1..5c0ca89305 100644 --- a/src/test/rpc/AccountSet_test.cpp +++ b/src/test/rpc/AccountSet_test.cpp @@ -53,7 +53,7 @@ public: Account const alice("alice"); // Test without DepositAuth enabled initially. - Env env(*this, supported_amendments() - featureDepositAuth); + Env env(*this, testable_amendments() - featureDepositAuth); env.fund(XRP(10000), noripple(alice)); // Give alice a regular key so she can legally set and clear @@ -357,7 +357,7 @@ public: }; doTests( - supported_amendments(), + testable_amendments(), {{1.0, tesSUCCESS, 1.0}, {1.1, tesSUCCESS, 1.1}, {2.0, tesSUCCESS, 2.0}, diff --git a/src/test/rpc/BookChanges_test.cpp b/src/test/rpc/BookChanges_test.cpp index 1f059c2bf7..1f7b6775f2 100644 --- a/src/test/rpc/BookChanges_test.cpp +++ b/src/test/rpc/BookChanges_test.cpp @@ -94,7 +94,7 @@ public: using namespace jtx; FeatureBitset const all{ - jtx::supported_amendments() | featurePermissionedDomains | + jtx::testable_amendments() | featurePermissionedDomains | featureCredentials | featurePermissionedDEX}; Env env(*this, all); diff --git a/src/test/rpc/Book_test.cpp b/src/test/rpc/Book_test.cpp index 0ec36eca53..e885762644 100644 --- a/src/test/rpc/Book_test.cpp +++ b/src/test/rpc/Book_test.cpp @@ -1737,7 +1737,7 @@ public: using namespace jtx; FeatureBitset const all{ - jtx::supported_amendments() | featurePermissionedDomains | + jtx::testable_amendments() | featurePermissionedDomains | featureCredentials | featurePermissionedDEX}; Env env(*this, all); @@ -1868,7 +1868,7 @@ public: using namespace jtx; FeatureBitset const all{ - jtx::supported_amendments() | featurePermissionedDomains | + jtx::testable_amendments() | featurePermissionedDomains | featureCredentials | featurePermissionedDEX}; Env env(*this, all); diff --git a/src/test/rpc/GatewayBalances_test.cpp b/src/test/rpc/GatewayBalances_test.cpp index 93e88b78ac..691f32317e 100644 --- a/src/test/rpc/GatewayBalances_test.cpp +++ b/src/test/rpc/GatewayBalances_test.cpp @@ -251,7 +251,7 @@ public: run() override { using namespace jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); for (auto feature : {sa - featurePermissionedDEX, sa}) { testGWB(feature); diff --git a/src/test/rpc/LedgerData_test.cpp b/src/test/rpc/LedgerData_test.cpp index c2b22efc00..54f51255d1 100644 --- a/src/test/rpc/LedgerData_test.cpp +++ b/src/test/rpc/LedgerData_test.cpp @@ -304,8 +304,8 @@ public: // Make sure fixInnerObjTemplate2 doesn't break amendments. for (FeatureBitset const& features : - {supported_amendments() - fixInnerObjTemplate2, - supported_amendments() | fixInnerObjTemplate2}) + {testable_amendments() - fixInnerObjTemplate2, + testable_amendments() | fixInnerObjTemplate2}) { using namespace std::chrono; Env env{*this, envconfig(validator, ""), features}; diff --git a/src/test/rpc/LedgerEntry_test.cpp b/src/test/rpc/LedgerEntry_test.cpp index 83232f79c8..b5cab9d13c 100644 --- a/src/test/rpc/LedgerEntry_test.cpp +++ b/src/test/rpc/LedgerEntry_test.cpp @@ -2221,7 +2221,7 @@ class LedgerEntry_test : public beast::unit_test::suite using namespace test::jtx; - Env env(*this, supported_amendments() | featurePermissionedDomains); + Env env(*this, testable_amendments() | featurePermissionedDomains); Account const issuer{"issuer"}; Account const alice{"alice"}; Account const bob{"bob"}; diff --git a/src/test/rpc/NoRipple_test.cpp b/src/test/rpc/NoRipple_test.cpp index 1450abef69..926de31e83 100644 --- a/src/test/rpc/NoRipple_test.cpp +++ b/src/test/rpc/NoRipple_test.cpp @@ -293,7 +293,7 @@ public: testPairwise(features); }; using namespace jtx; - auto const sa = supported_amendments(); + auto const sa = testable_amendments(); withFeatsTests(sa - featurePermissionedDEX); withFeatsTests(sa); } diff --git a/src/test/rpc/Subscribe_test.cpp b/src/test/rpc/Subscribe_test.cpp index e414b60f93..989afc0acc 100644 --- a/src/test/rpc/Subscribe_test.cpp +++ b/src/test/rpc/Subscribe_test.cpp @@ -1307,7 +1307,7 @@ public: using namespace jtx; using namespace std::chrono_literals; FeatureBitset const all{ - jtx::supported_amendments() | featurePermissionedDomains | + jtx::testable_amendments() | featurePermissionedDomains | featureCredentials | featurePermissionedDEX}; Env env(*this, all); @@ -1577,7 +1577,7 @@ public: run() override { using namespace test::jtx; - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; FeatureBitset const xrpFees{featureXRPFees}; testServer(); diff --git a/src/test/rpc/Transaction_test.cpp b/src/test/rpc/Transaction_test.cpp index 724a3a0517..e1db485572 100644 --- a/src/test/rpc/Transaction_test.cpp +++ b/src/test/rpc/Transaction_test.cpp @@ -941,7 +941,7 @@ public: forAllApiVersions( std::bind_front(&Transaction_test::testBinaryRequest, this)); - FeatureBitset const all{supported_amendments()}; + FeatureBitset const all{testable_amendments()}; testWithFeats(all); }