From 016dce8654e73022fd030c7ddac6de74517ef436 Mon Sep 17 00:00:00 2001 From: Denis Angell Date: Wed, 4 Oct 2023 09:16:08 +0200 Subject: [PATCH] add comment --- src/ripple/app/tx/impl/SetTrust.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ripple/app/tx/impl/SetTrust.cpp b/src/ripple/app/tx/impl/SetTrust.cpp index 40919e603a5..00a5165221e 100644 --- a/src/ripple/app/tx/impl/SetTrust.cpp +++ b/src/ripple/app/tx/impl/SetTrust.cpp @@ -133,7 +133,7 @@ SetTrust::preclaim(PreclaimContext const& ctx) auto const sleDst = ctx.view.read(keylet::account(uDstAccountID)); // If the destination has opted to disallow incoming trustlines - // then honour that flag ONLY if the trustline doesn't exist + // then honour that flag if (ctx.view.rules().enabled(featureDisallowIncoming)) { if (!sleDst) @@ -141,6 +141,11 @@ SetTrust::preclaim(PreclaimContext const& ctx) if (sleDst->getFlags() & lsfDisallowIncomingTrustline) { + // The original implementation of featureDisallowIncoming was + // too restrictive. If + // o fixDisallowIncomingV1 is enabled and + // o The trust line already exists + // Then allow the TrustSet. if (ctx.view.rules().enabled(fixDisallowIncomingV1) && ctx.view.exists(keylet::line(id, uDstAccountID, currency))) {