refactor: Extract escrow lock helpers and paychan test helpers - #7882
Open
dangell7 wants to merge 1 commit into
Open
refactor: Extract escrow lock helpers and paychan test helpers#7882dangell7 wants to merge 1 commit into
dangell7 wants to merge 1 commit into
Conversation
dangell7
force-pushed
the
dangell7/escrow-paychan-refactor
branch
from
July 28, 2026 00:23
1bd10e0 to
866afee
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
|
||
| template <> | ||
| inline TER | ||
| escrowLockPreclaimHelper<Issue>( |
Contributor
There was a problem hiding this comment.
just a nit, but it might be worthwhile to considering moving these explicit template instantiations into a source file.
| bool const recvLow = issuer > receiver; | ||
| bool const senderIssuer = issuer == sender; | ||
| bool const receiverIssuer = issuer == receiver; | ||
| bool const lineExisted = ctx.view.exists(trustLineKey); |
Contributor
There was a problem hiding this comment.
super nit and a problem not for this PR, but we don't need to construct most of these variables until after line 355.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
High Level Overview of Change
Pulls the refactoring out of #5448 (XLS-93d Token-Enabled Payment Channels) into its own PR so it can merge ahead of the feature. Code motion only, no functional change.
EscrowHelpers.h.paychanhelpers fromTestHelpers.hinto their owntest/jtx/paychan.h, and hoists the file-local helpers fromPayChan_test.cppinto them.EscrowToken_test.cppinto the shared jtxTestHelpers.h.Context of Change
Split out of #5448 per review feedback. The token paychan transactors reuse the escrow lock/unlock helpers, so the extraction lands here first and the feature PR becomes mostly additive.
API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)Test Plan
No new tests, the moved code is covered by the existing suites. Ran Escrow, EscrowToken, Sponsor, PayChan, MPToken, AMM.