Skip to content

refactor: Move isGlobalFrozen onto AccountRootEntry - #8438

Open
mvadari wants to merge 8 commits into
mvadari/rearch/accountroot-checkDestinationAndTagfrom
mvadari/rearch/accountroot-isGlobalFrozen
Open

mvadari wants to merge 8 commits into
mvadari/rearch/accountroot-checkDestinationAndTagfrom
mvadari/rearch/accountroot-isGlobalFrozen

Conversation

@mvadari

@mvadari mvadari commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

High Level Overview of Change

Adds the const member AccountRootEntry::isGlobalFrozen(), which reads lsfGlobalFreeze. The isGlobalFrozen(view, issuer) free function stays as the shim and keeps its XRP and missing-account handling; it now calls the member. No caller passed an entry, so no call sites change.

Context of Change

Part of the Wrapped SLEs migration (design: step 2/3 of #7886). Code that already holds an AccountRoot entry can now ask it directly, with the type checked by the compiler. Pure refactor: no amendment, no behavior change; any observable difference is a bug.

Stacked on #8437; 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) every .cpp that includes AccountRootEntry.h or AccountRootHelpers.h (98/98 passed). clang-tidy clean on both 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.

Small, well-scoped refactor that moves the lsfGlobalFreeze check onto AccountRootEntry::isGlobalFrozen() and updates the free function to delegate to it. Logic is equivalent to the prior inline check; no behavior change spotted.

@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/accountroot-isGlobalFrozen branch from ff15e03 to caa8a76 Compare September 30, 2026 17:58
@mvadari
mvadari added this pull request to stack #8448 September 30, 2026 17:59
@mvadari
mvadari force-pushed the mvadari/rearch/accountroot-isGlobalFrozen branch from caa8a76 to ba2048b Compare October 5, 2026 13:59
Add the const member AccountRootEntry::isGlobalFrozen(), which reads
lsfGlobalFreeze. The isGlobalFrozen(view, issuer) free function stays
as the shim and keeps its XRP and missing-account handling.
@mvadari
mvadari force-pushed the mvadari/rearch/accountroot-isGlobalFrozen branch from ba2048b to dcd32a6 Compare October 5, 2026 14:53

@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.

This is a clean, mechanical refactor that moves isGlobalFrozen() onto AccountRootEntry as a member function, with the free function AccountRootHelpers::isGlobalFrozen delegating to it while retaining its XRP/missing-account handling. The logic is unchanged (same lsfGlobalFreeze flag check), the new member follows the same style as the existing isPseudoAccount() member, and the call site update is a correct direct method call (not pointer dereference), consistent with how AccountRootEntryR already exposes member functions directly. No behavior change, no new risks introduced.

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