Sponsored Content
Skip to content

refactor: split up RPCHelpers.h into two - #6047

Merged
bthomee merged 3 commits into
XRPLF:developfrom
mvadari:refactor-rpc-helpers2
Nov 18, 2025
Merged

refactor: split up RPCHelpers.h into two#6047
bthomee merged 3 commits into
XRPLF:developfrom
mvadari:refactor-rpc-helpers2

Conversation

@mvadari

@mvadari mvadari commented Nov 18, 2025

Copy link
Copy Markdown
Contributor

High Level Overview of Change

This PR splits RPCHelpers.h into two files, by moving out all the ledger-fetching-related functions into a separate file, RPCLedgerHelpers.h. It also moves getAccountObjects to AccountObjects.h, since it is only used in that one place.

This PR does not make any functionality changes, just moves code. Code changes are out of scope of this PR and should be included in #5684 instead.

Context of Change

This is a precursor to #5684, to make that PR easier to review.

Type of Change

  • Refactor (non-breaking change that only restructures code)

API Impact

N/A

Test Plan

Tests pass with no changes.

@mvadari
mvadari requested review from a team and godexsoft November 18, 2025 09:26
@mvadari mvadari added the Trivial Simple change with minimal effect, or already tested. Only needs one approval. label Nov 18, 2025
@codecov

codecov Bot commented Nov 18, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.02996% with 64 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.6%. Comparing base (3fb6acd) to head (b1012b4).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/xrpld/rpc/detail/RPCLedgerHelpers.cpp 68.3% 57 Missing ⚠️
src/xrpld/rpc/handlers/AccountObjects.cpp 92.0% 7 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #6047     +/-   ##
=========================================
- Coverage     78.6%   78.6%   -0.0%     
=========================================
  Files          817     818      +1     
  Lines        68976   68976             
  Branches      8242    8239      -3     
=========================================
- Hits         54196   54195      -1     
- Misses       14780   14781      +1     
Files with missing lines Coverage Δ
src/xrpld/app/rdb/RelationalDatabase.h 100.0% <ø> (ø)
src/xrpld/rpc/detail/RPCHelpers.cpp 89.4% <ø> (+7.6%) ⬆️
src/xrpld/rpc/handlers/AMMInfo.cpp 92.9% <ø> (ø)
src/xrpld/rpc/handlers/AccountChannels.cpp 81.4% <ø> (ø)
...rc/xrpld/rpc/handlers/AccountCurrenciesHandler.cpp 97.5% <ø> (ø)
src/xrpld/rpc/handlers/AccountInfo.cpp 88.5% <ø> (ø)
src/xrpld/rpc/handlers/AccountLines.cpp 88.3% <ø> (ø)
src/xrpld/rpc/handlers/AccountOffers.cpp 89.5% <ø> (ø)
src/xrpld/rpc/handlers/BookOffers.cpp 98.9% <ø> (ø)
src/xrpld/rpc/handlers/DepositAuthorized.cpp 100.0% <ø> (ø)
... and 15 more

... and 1 file with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Looks ok 👍

@mvadari mvadari added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label Nov 18, 2025
@bthomee
bthomee merged commit d9c27da into XRPLF:develop Nov 18, 2025
2 of 3 checks passed
@mvadari
mvadari deleted the refactor-rpc-helpers2 branch January 8, 2026 15:15
@mvadari mvadari added this to the 3.2.0 milestone May 20, 2026
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
This PR splits `RPCHelpers.h` into two files, by moving out all the ledger-fetching-related functions into a separate file, `RPCLedgerHelpers.h`. It also moves `getAccountObjects` to `AccountObjects.h`, since it is only used in that one place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. Trivial Simple change with minimal effect, or already tested. Only needs one approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants