diff --git a/include/xrpl/protocol/detail/features.macro b/include/xrpl/protocol/detail/features.macro index 340200dfea..e4c4c87844 100644 --- a/include/xrpl/protocol/detail/features.macro +++ b/include/xrpl/protocol/detail/features.macro @@ -92,7 +92,6 @@ XRPL_FIX (TrustLinesToSelf, Supported::yes, VoteBehavior::DefaultNo XRPL_FEATURE(NonFungibleTokensV1_1, Supported::yes, VoteBehavior::DefaultNo) XRPL_FEATURE(ExpandedSignerList, Supported::yes, VoteBehavior::DefaultNo) XRPL_FEATURE(CheckCashMakesTrustLine, Supported::yes, VoteBehavior::DefaultNo) -XRPL_FIX (RmSmallIncreasedQOffers, Supported::yes, VoteBehavior::DefaultYes) XRPL_FIX (STAmountCanonicalize, Supported::yes, VoteBehavior::DefaultYes) XRPL_FEATURE(FlowSortStrands, Supported::yes, VoteBehavior::DefaultYes) XRPL_FEATURE(TicketBatch, Supported::yes, VoteBehavior::DefaultYes) @@ -132,28 +131,29 @@ XRPL_FEATURE(CryptoConditionsSuite, Supported::yes, VoteBehavior::Obsolete) // pre-amendment code has been removed and the identifiers are deprecated. // All known amendments and amendments that may appear in a validated // ledger must be registered either here or above with the "active" amendments -XRPL_RETIRE(MultiSign) -XRPL_RETIRE(TrustSetAuth) -XRPL_RETIRE(FeeEscalation) -XRPL_RETIRE(PayChan) -XRPL_RETIRE(CryptoConditions) -XRPL_RETIRE(TickSize) -XRPL_RETIRE(fix1368) -XRPL_RETIRE(Escrow) -XRPL_RETIRE(fix1373) -XRPL_RETIRE(EnforceInvariants) -XRPL_RETIRE(SortedDirectories) XRPL_RETIRE(fix1201) +XRPL_RETIRE(fix1368) +XRPL_RETIRE(fix1373) XRPL_RETIRE(fix1512) -XRPL_RETIRE(fix1523) -XRPL_RETIRE(fix1528) -XRPL_RETIRE(FlowCross) XRPL_RETIRE(fix1513) XRPL_RETIRE(fix1515) +XRPL_RETIRE(fix1523) +XRPL_RETIRE(fix1528) XRPL_RETIRE(fix1543) -XRPL_RETIRE(fix1781) XRPL_RETIRE(fix1571) XRPL_RETIRE(fix1578) +XRPL_RETIRE(fix1781) XRPL_RETIRE(fixCheckThreading) +XRPL_RETIRE(fixRmSmallIncreasedQOffers) +XRPL_RETIRE(CryptoConditions) +XRPL_RETIRE(Escrow) +XRPL_RETIRE(EnforceInvariants) +XRPL_RETIRE(FeeEscalation) +XRPL_RETIRE(FlowCross) +XRPL_RETIRE(MultiSign) +XRPL_RETIRE(PayChan) +XRPL_RETIRE(SortedDirectories) +XRPL_RETIRE(TickSize) +XRPL_RETIRE(TrustSetAuth) // clang-format on diff --git a/src/test/app/Offer_test.cpp b/src/test/app/Offer_test.cpp index 709d3b213b..c279afd2a2 100644 --- a/src/test/app/Offer_test.cpp +++ b/src/test/app/Offer_test.cpp @@ -366,37 +366,22 @@ public: env(offer(alice, USD(1), aliceTakerGets)); env.close(); - if (features[fixRmSmallIncreasedQOffers]) + env.require( + offers(carol, 0), + balance( + carol, + initialCarolUSD)); // offer is removed but not taken + if (crossBothOffers) { env.require( - offers(carol, 0), - balance( - carol, - initialCarolUSD)); // offer is removed but not taken - if (crossBothOffers) - { - env.require( - offers(alice, 0), - balance(alice, USD(1))); // alice's offer is crossed - } - else - { - env.require( - offers(alice, 1), - balance( - alice, USD(0))); // alice's offer is not crossed - } + offers(alice, 0), + balance(alice, USD(1))); // alice's offer is crossed } else { env.require( offers(alice, 1), - offers(bob, 1), - offers(carol, 1), - balance(alice, USD(0)), - balance( - carol, - initialCarolUSD)); // offer is not crossed at all + balance(alice, USD(0))); // alice's offer is not crossed } } @@ -434,36 +419,19 @@ public: ter(expectedTer)); env.close(); - if (features[fixRmSmallIncreasedQOffers]) + if (expectedTer == tesSUCCESS) { - if (expectedTer == tesSUCCESS) - { - env.require(offers(carol, 0)); - env.require(balance( - carol, - initialCarolUSD)); // offer is removed but not taken - } - else - { - // TODO: Offers are not removed when payments fail - // If that is addressed, the test should show that carol's - // offer is removed but not taken, as in the other branch of - // this if statement - } + env.require(offers(carol, 0)); + env.require(balance( + carol, + initialCarolUSD)); // offer is removed but not taken } else { - if (partialPayment) - { - env.require(offers(carol, 0)); - env.require( - balance(carol, USD(0))); // offer is removed and taken - } - else - { - // offer is not removed or taken - BEAST_EXPECT(isOffer(env, carol, drops(1), USD(1))); - } + // TODO: Offers are not removed when payments fail + // If that is addressed, the test should show that carol's + // offer is removed but not taken, as in the other branch of + // this if statement } } } @@ -526,37 +494,22 @@ public: env(offer(alice, USD(1), aliceTakerGets)); env.close(); - if (features[fixRmSmallIncreasedQOffers]) + env.require( + offers(carol, 0), + balance( + carol, + initialCarolUSD)); // offer is removed but not taken + if (crossBothOffers) { env.require( - offers(carol, 0), - balance( - carol, - initialCarolUSD)); // offer is removed but not taken - if (crossBothOffers) - { - env.require( - offers(alice, 0), - balance(alice, USD(1))); // alice's offer is crossed - } - else - { - env.require( - offers(alice, 1), - balance( - alice, USD(0))); // alice's offer is not crossed - } + offers(alice, 0), + balance(alice, USD(1))); // alice's offer is crossed } else { env.require( offers(alice, 1), - offers(bob, 1), - offers(carol, 1), - balance(alice, USD(0)), - balance( - carol, - initialCarolUSD)); // offer is not crossed at all + balance(alice, USD(0))); // alice's offer is not crossed } } @@ -597,36 +550,19 @@ public: ter(expectedTer)); env.close(); - if (features[fixRmSmallIncreasedQOffers]) + if (expectedTer == tesSUCCESS) { - if (expectedTer == tesSUCCESS) - { - env.require(offers(carol, 0)); - env.require(balance( - carol, - initialCarolUSD)); // offer is removed but not taken - } - else - { - // TODO: Offers are not removed when payments fail - // If that is addressed, the test should show that carol's - // offer is removed but not taken, as in the other branch of - // this if statement - } + env.require(offers(carol, 0)); + env.require(balance( + carol, + initialCarolUSD)); // offer is removed but not taken } else { - if (partialPayment) - { - env.require(offers(carol, 0)); - env.require( - balance(carol, USD(0))); // offer is removed and taken - } - else - { - // offer is not removed or taken - BEAST_EXPECT(isOffer(env, carol, EUR(1), USD(2))); - } + // TODO: Offers are not removed when payments fail + // If that is addressed, the test should show that carol's + // offer is removed but not taken, as in the other branch of + // this if statement } } } @@ -5359,8 +5295,6 @@ public: using namespace jtx; static FeatureBitset const all{testable_amendments()}; static FeatureBitset const takerDryOffer{fixTakerDryOfferRemoval}; - static FeatureBitset const rmSmallIncreasedQOffers{ - fixRmSmallIncreasedQOffers}; static FeatureBitset const immediateOfferKilled{ featureImmediateOfferKilled}; FeatureBitset const fillOrKill{fixFillOrKill}; @@ -5369,8 +5303,7 @@ public: static std::array const feats{ all - takerDryOffer - immediateOfferKilled - permDEX, all - immediateOfferKilled - permDEX, - all - rmSmallIncreasedQOffers - immediateOfferKilled - fillOrKill - - permDEX, + all - immediateOfferKilled - fillOrKill - permDEX, all - fillOrKill - permDEX, all - permDEX, all}; diff --git a/src/xrpld/app/tx/detail/OfferStream.cpp b/src/xrpld/app/tx/detail/OfferStream.cpp index 9d43e419d7..8f19c20cf5 100644 --- a/src/xrpld/app/tx/detail/OfferStream.cpp +++ b/src/xrpld/app/tx/detail/OfferStream.cpp @@ -158,9 +158,6 @@ TOfferStreamBase::shouldRmSmallIncreasedQOffer() const !std::is_same_v, "Cannot have XRP/XRP offers"); - if (!view_.rules().enabled(fixRmSmallIncreasedQOffers)) - return false; - // Consider removing the offer if: // o `TakerPays` is XRP (because of XRP drops granularity) or // o `TakerPays` and `TakerGets` are both IOU and `TakerPays`<`TakerGets`