Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
8c90185 to
3debac2
Compare
There was a problem hiding this comment.
Pure mechanical refactor moving isPseudoAccount from a free function taking AccountRootEntryR into a const member on AccountRootEntry, with all ~15 call sites updated consistently (sle.isPseudoAccount() instead of isPseudoAccount(sle)) and the now-unused AccountRootHelpers.h includes dropped where appropriate. The member implementation is a verbatim copy of the old free-function body (same exists()/getType()/any_of logic), and the remaining view+AccountID overload correctly delegates to the new member. No behavioral change is evident in the diff; call sites that previously null-checked before calling (e.g. TrustSet.cpp's sleDst && ...) preserve that check. Nothing here rises to a confident bug, security, or correctness issue.
3debac2 to
0001d6a
Compare
0001d6a to
d9efc2c
Compare
Replace the entry-taking isPseudoAccount free function with the const member AccountRootEntry::isPseudoAccount(). The (view, AccountID) overload stays as a one-line shim. The invariant-only isPseudoAccountSle(SLE) helper is unchanged; VaultInvariant.cpp changes only because its call used the removed overload.
|
This PR has conflicts, please resolve them in order for the PR to be reviewed. |
d9efc2c to
d21cf46
Compare
|
All conflicts have been resolved. Assigned reviewers can now start or resume their review. |
There was a problem hiding this comment.
Clean, mechanical refactor moving isPseudoAccount from a free function taking AccountRootEntryR to a const member on AccountRootEntry. The new member's logic (this->exists() && getType() == ltACCOUNT_ROOT && any_of over pseudo-account fields) is identical to the removed free function's logic, just rebased onto this. All call sites were updated consistently to use the member syntax, the one-line view/AccountID overload shim correctly delegates to the new member, and now-unused AccountRootHelpers.h includes were pruned from files that no longer need them. I didn't find any correctness, security, or consistency issues introduced by this change.
…dari/rearch/accountroot-isPseudoAccount # Conflicts: # src/libxrpl/ledger/helpers/SponsorHelpers.cpp # src/libxrpl/tx/invariants/VaultInvariant.cpp # src/libxrpl/tx/transactors/check/CheckCreate.cpp # src/libxrpl/tx/transactors/escrow/EscrowCreate.cpp
|
This PR has conflicts, please resolve them in order for the PR to be reviewed. |
…dari/rearch/accountroot-isPseudoAccount
…dari/rearch/accountroot-isPseudoAccount
|
All conflicts have been resolved. Assigned reviewers can now start or resume their review. |
High Level Overview of Change
Replaces the entry-taking
isPseudoAccount(AccountRootEntryR const&)free function with the const memberAccountRootEntry::isPseudoAccount(). TheisPseudoAccount(view, AccountID)overload stays as a one-line shim. The invariant-onlyisPseudoAccountSle(SLE)helper inInvariantCheck.cppis unchanged;VaultInvariant.cppchanges only because its one call used the removed overload.Context of Change
Part of the Wrapped SLEs migration (design: step 2/3 of #7886). The check now lives on the typed entry, so it cannot be called with an SLE of the wrong type. Pure refactor: no amendment, no behavior change; any observable difference is a bug.
Stacked on #8427; 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) every changed.cppand every.cppthat includesAccountRootEntry.horAccountRootHelpers.h(98/98 passed, plusVaultInvariant.cpp). clang-tidy clean on all changed files and headers; pre-commit clean. No new tests. CI runs the full unit test suite.🤖 Generated with Claude Code