Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into XRPFees_fee_ref
Browse files Browse the repository at this point in the history
* upstream/develop:
  `fixDisallowIncomingV1`: allow issuers to authorize trust lines (4721)
  refactor: reduce boilerplate in applySteps: (4710)
  • Loading branch information
ximinez committed Oct 6, 2023
2 parents c260112 + 6ba9450 commit 5c82866
Show file tree
Hide file tree
Showing 5 changed files with 229 additions and 456 deletions.
15 changes: 14 additions & 1 deletion src/ripple/app/tx/impl/SetTrust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,20 @@ SetTrust::preclaim(PreclaimContext const& ctx)
return tecNO_DST;

if (sleDst->getFlags() & lsfDisallowIncomingTrustline)
return tecNO_PERMISSION;
{
// 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)))
{
// pass
}
else
return tecNO_PERMISSION;
}
}

// If destination is AMM and the trustline doesn't exist then only
Expand Down
Loading

0 comments on commit 5c82866

Please sign in to comment.