From 06d1b696c18cf453c367caf0ee6da79f01d798b9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 30 Jan 2026 16:55:59 +0000 Subject: [PATCH] Create new amendment fixDisallowIncomingV2 for OfferCreate blocker Co-authored-by: mvadari <8029314+mvadari@users.noreply.github.com> --- include/xrpl/protocol/detail/features.macro | 1 + src/test/app/Offer_test.cpp | 6 +++--- src/xrpld/app/tx/detail/CreateOffer.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/xrpl/protocol/detail/features.macro b/include/xrpl/protocol/detail/features.macro index d8498ffa2f..7466f9b173 100644 --- a/include/xrpl/protocol/detail/features.macro +++ b/include/xrpl/protocol/detail/features.macro @@ -16,6 +16,7 @@ // Add new amendments to the top of this list. // Keep it sorted in reverse chronological order. +XRPL_FIX (DisallowIncomingV2, Supported::yes, VoteBehavior::DefaultNo) XRPL_FIX (ExpiredNFTokenOfferRemoval, Supported::yes, VoteBehavior::DefaultNo) XRPL_FIX (BatchInnerSigs, Supported::yes, VoteBehavior::DefaultNo) XRPL_FEATURE(LendingProtocol, Supported::yes, VoteBehavior::DefaultNo) diff --git a/src/test/app/Offer_test.cpp b/src/test/app/Offer_test.cpp index 29b0ffaf19..cc7b03ee76 100644 --- a/src/test/app/Offer_test.cpp +++ b/src/test/app/Offer_test.cpp @@ -4193,9 +4193,9 @@ public: using namespace jtx; - // Test without fixDisallowIncomingV1 amendment + // Test without fixDisallowIncomingV2 amendment { - Env env{*this, features - fixDisallowIncomingV1}; + Env env{*this, features - fixDisallowIncomingV2}; auto const gw = Account("gw"); auto const alice = Account("alice"); @@ -4231,7 +4231,7 @@ public: env.require(balance(bob, gwUSD(40))); } - // Test with fixDisallowIncomingV1 amendment + // Test with fixDisallowIncomingV2 amendment { Env env{*this, features}; diff --git a/src/xrpld/app/tx/detail/CreateOffer.cpp b/src/xrpld/app/tx/detail/CreateOffer.cpp index 96a179a12b..38dfa96f44 100644 --- a/src/xrpld/app/tx/detail/CreateOffer.cpp +++ b/src/xrpld/app/tx/detail/CreateOffer.cpp @@ -221,7 +221,7 @@ CreateOffer::checkAcceptAsset( // Check if the issuer has lsfDisallowIncomingTrustline set // If so, the account must already have a trustline to receive tokens - if (view.rules().enabled(fixDisallowIncomingV1) && + if (view.rules().enabled(fixDisallowIncomingV2) && ((*issuerAccount)[sfFlags] & lsfDisallowIncomingTrustline)) { if (!trustLine)