Repository navigation
Conversation
There was a problem hiding this comment.
Pure mechanical refactor moving availableMPTAmount onto MPTokenIssuanceEntry as a const member and updating call sites. The logic is copied verbatim (max - outstanding), and the ReadView/MPTID shim still throws as before. No behavior change is evident, and callers were updated consistently across MPTokenHelpers.cpp and TokenHelpers.cpp.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
408591e to
092f77f
Compare
092f77f to
3626018
Compare
|
This PR has conflicts, please resolve them in order for the PR to be reviewed. |
|
This PR has conflicts, please resolve them in order for the PR to be reviewed. |
3626018 to
8fa25ee
Compare
|
All conflicts have been resolved. Assigned reviewers can now start or resume their review. |
There was a problem hiding this comment.
Pure mechanical refactor moving availableMPTAmount onto MPTokenIssuanceEntry as an inline member. The new availableAmount() implementation is a faithful move of the old free-function body: maxAmount() is still called first and sfOutstandingAmount is still read via the same double-dereference pattern (**this ≡ old *sleIssuance), so there's no behavioral change at the call sites in MPTokenHelpers.cpp and TokenHelpers.cpp. No new issues identified in the changed lines.
Replace the free availableMPTAmount(MPTokenIssuanceEntryR const&) with the const member MPTokenIssuanceEntry::availableAmount(). The (ReadView, MPTID) overload stays as a shim that builds the entry, throws if it is missing, and calls the member.
|
This PR has conflicts, please resolve them in order for the PR to be reviewed. |
8fa25ee to
5eedd7c
Compare
|
All conflicts have been resolved. Assigned reviewers can now start or resume their review. |
…ri/rearch/mptokenissuance-availableMPTAmount
…ri/rearch/mptokenissuance-availableMPTAmount
…ri/rearch/mptokenissuance-availableMPTAmount
High Level Overview of Change
Moves
availableMPTAmount(MPTokenIssuanceEntryR const&)onto the wrapper as the const memberMPTokenIssuanceEntry::availableAmount()(inline in the header). The free entry overload is deleted and its callers inMPTokenHelpers.cppandTokenHelpers.cppnow call the member. TheavailableMPTAmount(ReadView const&, MPTID const&)overload stays as a shim that builds the entry, throws if it is missing (as before), and calls the member.Context of Change
Part of the Wrapped SLEs migration (design: step 2/3 of #7886). Issuance-specific logic now lives on the typed wrapper, so the compiler rejects calls with the wrong entry type. Pure refactor: no amendment, no behavior change; any observable difference is a bug.
Stacked on #8375; review only the last commit.
This PR was fully written by AI (Claude Code) under human direction; the human author reviewed the diff.
API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)Test Plan
Syntax-checked (
clang++ -fsyntax-onlywith project flags)MPTokenIssuanceEntry.cppand all 48 .cpp files that includeMPTokenIssuanceEntry.horMPTokenHelpers.h; clang-tidy clean on the changed files; pre-commit clean. No new tests. CI runs the full unit test suite.🤖 Generated with Claude Code