Skip to content

refactor: Move isGlobalFrozen onto MPTokenIssuanceEntry - #8374

Open
mvadari wants to merge 4 commits into
mvadari/rearch/mptokenissuance-entryfrom
mvadari/rearch/mptokenissuance-isGlobalFrozen
Open

mvadari wants to merge 4 commits into
mvadari/rearch/mptokenissuance-entryfrom
mvadari/rearch/mptokenissuance-isGlobalFrozen

Conversation

@mvadari

@mvadari mvadari commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

High Level Overview of Change

Moves isGlobalFrozen(MPTokenIssuanceEntryR const&) onto the wrapper as the const member MPTokenIssuanceEntry::isGlobalFrozen(). The free SLE overload is deleted and its callers in MPTokenHelpers.cpp now call the member. The isGlobalFrozen(ReadView const&, MPTIssue const&) overload stays as a shim that builds the entry 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. The old XRPL_ASSERT on the SLE type is dropped because the SLEBase constructors already check the bound type. Pure refactor: no amendment, no behavior change; any observable difference is a bug.

Stacked on #8359; 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

  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)

Test Plan

Syntax-checked (clang++ -fsyntax-only with project flags) all 48 .cpp files that include MPTokenIssuanceEntry.h or MPTokenHelpers.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

@ripple-ai-reviewer ripple-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, mechanical refactor moving isGlobalFrozen from a free function taking MPTokenIssuanceEntryR into a const member on MPTokenIssuanceEntry. All call sites in MPTokenHelpers.cpp are updated consistently, and short-circuit truthiness checks on issuanceSle before calling the new member are preserved where they existed in the original code (lines around isFrozen/isAnyFrozen). No behavior change, no new correctness or security issues identified in the added lines.

@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mvadari
mvadari force-pushed the mvadari/rearch/mptokenissuance-isGlobalFrozen branch from 4c32248 to 3c5c06e Compare September 30, 2026 18:00
@mvadari
mvadari added this pull request to stack #8451 September 30, 2026 18:03
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

This PR has conflicts, please resolve them in order for the PR to be reviewed.

@mvadari
mvadari force-pushed the mvadari/rearch/mptokenissuance-isGlobalFrozen branch from 3c5c06e to 6e7265e Compare October 5, 2026 13:59
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

All conflicts have been resolved. Assigned reviewers can now start or resume their review.

@ripple-ai-reviewer ripple-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean mechanical refactor: isGlobalFrozen is moved from a free function taking MPTokenIssuanceEntryR to a const member on the wrapper. All call sites in MPTokenHelpers.cpp are updated consistently and short-circuit guards (issuanceSle && issuanceSle.isGlobalFrozen()) are preserved correctly. The dropped XRPL_ASSERT is justified by SLEBase's constructor-level type checking, consistent with the stated migration pattern. No behavioral changes or correctness issues found in the diff.

Replace the free isGlobalFrozen(MPTokenIssuanceEntryR const&) with a
const member MPTokenIssuanceEntry::isGlobalFrozen(). The
(ReadView, MPTIssue) overload stays as a shim that builds the entry and
calls the member. The old type assertion is dropped: the entry type is
now bound at compile time and checked by the SLEBase constructors.
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

This PR has conflicts, please resolve them in order for the PR to be reviewed.

@mvadari
mvadari force-pushed the mvadari/rearch/mptokenissuance-isGlobalFrozen branch from 63751ec to 37f8e3f Compare November 9, 2026 23:15
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

All conflicts have been resolved. Assigned reviewers can now start or resume their review.

@ripple-ai-reviewer ripple-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant