refactor: Split combined transactor files into individual classes - #6495
Conversation
- Rename subdirs to lowercase (AMM→amm, Check→check, NFT→nft, etc.) - Merge AMM and Offer into dex/, add PermissionedDEXHelpers - Rename mpt→token, add SetTrust and Clawback - Group: account, bridge, oracle, payment, system, escrow, did, credentials, payment_channel, permissioned_domain, vault, lending Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…Accept Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #6495 +/- ##
=========================================
- Coverage 79.8% 79.8% -0.0%
=========================================
Files 862 878 +16
Lines 67883 67889 +6
Branches 7551 7554 +3
=========================================
+ Hits 54199 54201 +2
- Misses 13684 13688 +4
🚀 New features to boost your workflow:
|
|
Is that all? I've got a feeling that we have more to split. |
What comes to mind? The only one that is not split as part of this PR is the cross-chain bridge. That'll be done in a separate PR. It's more complex than the files in this PR. |
…vate src/libxrpl/ These headers are internal implementation details consumed only by .cpp files within the tx module. Moving them out of include/xrpl/ keeps them off the public API surface installed by the build system. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
godexsoft
left a comment
There was a problem hiding this comment.
Leaving one suggestion but given this is a refactoring effort it isn't a blocker.
| std::uint32_t | ||
| CredentialAccept::getFlagsMask(PreflightContext const& ctx) | ||
| { | ||
| // 0 means "Allow any flags" |
There was a problem hiding this comment.
Maybe a named constant would be better? i imagine this can be useful in many places. The comment then becomes unnecessary
There was a problem hiding this comment.
It's a good change, though definitely it should be part of a separate PR.
…PLF#6495) DID, Escrows, PaymentChannels, and Credentials previously contained multiple unrelated transactor classes in a single header/implementation pair. This change splits each into one class per file, following the same pattern established by the rest of the codebase.
Each of the following files previously contained multiple unrelated transactor classes in a single header/implementation pair. This PR splits each into one class per file, following the same pattern established by the rest of the codebase.
Changes
did/DID.h/.cppdid/DIDSet.h/.cpp,did/DIDDelete.h/.cppescrow/Escrow.h/.cppescrow/EscrowCreate.h/.cpp,escrow/EscrowFinish.h/.cpp,escrow/EscrowCancel.h/.cppcredentials/Credentials.h/.cppcredentials/CredentialCreate.h/.cpp,credentials/CredentialDelete.h/.cpp,credentials/CredentialAccept.h/.cpppayment_channel/PayChan.h/.cpppayment_channel/PayChanCreate.h/.cpp,payment_channel/PayChanFund.h/.cpp,payment_channel/PayChanClaim.h/.cppWhere classes shared implementation helpers, these were extracted into internal headers:
escrow/EscrowHelpers.h—escrowUnlockApplyHelpershared byEscrowFinishandEscrowCancelpayment_channel/PayChanHelpers.h/.cpp—closeChannelshared byPayChanFundandPayChanClaimtransactions.macroupdated to include each class header individually.Next Steps
This PR purposefully omits refactoring XChainBridge, as it's a complex refactor that should be performed in a separate PR.
No behavioral changes
This is a pure refactor. No logic was modified.
High Level Overview of Change
Context of Change
Type of Change
.gitignore, formatting, dropping support for older tooling)API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)