Repository navigation
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
This is a clean, mechanical refactor moving increaseOwnerCount onto AccountRootEntry as described. Call sites are consistently updated to the new member-call style, journals are correctly threaded into entry constructors where the old free function needed them, and the temporary friend relationship for decreaseOwnerCount/adjustOwnerCountSigned is set up correctly. I did not find correctness, security, or resource-management bugs in the changed lines. The one thing worth a second look is that decreaseOwnerCount's j parameter is now effectively unused for the actual mutation since adjustOwnerCountSigned pulls the journal from accountSle itself instead.
deb6636 to
c2bef79
Compare
There was a problem hiding this comment.
Clean, mechanical refactor that moves increaseOwnerCount onto AccountRootEntry and threads the entry's journal through call sites. Most constructor call sites were correctly updated to pass the same journal that was previously used explicitly (e.g. XChainBridge, OracleSet, MPTokenHelpers, RippleStateHelpers). However, in four transactors the refactor deleted a locally-created viewJ/"View" journal that was previously passed explicitly to increaseOwnerCount, and now the account entry's own (already-constructed, unmodified-in-this-diff) journal is used instead for owner-count logging inside adjustOwnerCountSigned. Since the PR explicitly states 'no behavior change; any observable difference is a bug,' it's worth confirming that entry's journal is actually the "View" partition in each case — otherwise owner-count/reserve log messages silently move to a different log category.
c2bef79 to
efdc52c
Compare
efdc52c to
186dc74
Compare
Replace both entry-taking increaseOwnerCount free functions with writable members of AccountRootEntry. The members use the entry's view and journal, so call sites pass their journal to the entry constructor. The AccountID-based overload stays as a shim. adjustOwnerCountSigned becomes a private member. decreaseOwnerCount is a temporary friend so it can still call it until it moves too. adjustOwnerCountImpl moves to namespace detail, because adjustLoanBrokerOwnerCount also uses it.
186dc74 to
97a780b
Compare
There was a problem hiding this comment.
Mechanical, well-scoped refactor moving increaseOwnerCount/adjustOwnerCountSigned onto AccountRootEntry; call sites consistently updated to pass journal to constructors and call the new members. Didn't find behavior-changing bugs in the sampled logic (adjustOwnerCountSigned body is a verbatim move, sponsor/reserve handling preserved). One minor cleanup item: decreaseOwnerCount's view/j parameters become dead after the refactor.
…earch/accountroot-increaseOwnerCount # Conflicts: # src/libxrpl/ledger/helpers/AccountRootHelpers.cpp # src/libxrpl/tx/transactors/account/SignerListSet.cpp # src/libxrpl/tx/transactors/bridge/XChainBridge.cpp # src/libxrpl/tx/transactors/check/CheckCreate.cpp # src/libxrpl/tx/transactors/did/DIDSet.cpp # src/libxrpl/tx/transactors/escrow/EscrowCreate.cpp # src/libxrpl/tx/transactors/payment/DepositPreauth.cpp # src/libxrpl/tx/transactors/proposal/TransactionProposalCreate.cpp
…earch/accountroot-increaseOwnerCount
High Level Overview of Change
Replaces both entry-taking
increaseOwnerCountfree functions with writable members ofAccountRootEntry:increaseOwnerCount(sponsorSle, count)andincreaseOwnerCount(ctx, count). The members use the entry's view and journal, so call sites pass their journal to the entry constructor. TheAccountID-based overload stays as a shim.adjustOwnerCountSignedbecomes a private member;decreaseOwnerCountis a temporary friend so it can still call it (the next PR in the stack removes the friend).adjustOwnerCountImplmoves tonamespace detail, becauseadjustLoanBrokerOwnerCountalso uses it on a LoanBroker SLE.Context of Change
Part of the Wrapped SLEs migration (design: step 2/3 of #7886). Owner-count updates now need a writable
AccountRootEntryW, so the compiler rejects them on a read-only entry. Pure refactor: no amendment, no behavior change; any observable difference is a bug.Stacked on #8406; 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). 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