Skip to content

tests: Add integration tests for RPC requests#160

Open
pdp2121 wants to merge 5 commits intomainfrom
add-rpc-integration-tests
Open

tests: Add integration tests for RPC requests#160
pdp2121 wants to merge 5 commits intomainfrom
add-rpc-integration-tests

Conversation

@pdp2121
Copy link
Copy Markdown
Collaborator

@pdp2121 pdp2121 commented Apr 8, 2026

High Level Overview of Change

  • Resolves Add integration tests for RPCs #146
  • Removes some AI-generated reference to xrpl.js
  • Replaces the opaque Option<serde_json::Value> node field in the LedgerEntry result with a typed LedgerEntryNode enum — a discriminated union over all ~20 ledger object types (like AccountRoot, DirectoryNode, Offer, etc.) — matching how xrpl.js uses a LedgerEntry union type. To work around serde's limitation where #[serde(tag = "...")] conflicts with #[serde(flatten)] in the inner structs, implements a custom Deserialize that buffers the JSON, peeks at the LedgerEntryType field to dispatch to the correct variant, and falls back to Unknown(Value) for unrecognized types. This allows type-safe pattern matching on ledger objects while remaining resilient to new ledger entry types added to rippled.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (You added tests for code that already exists, or your new feature included in this PR)
  • Documentation Updates
  • Release

@pdp2121
Copy link
Copy Markdown
Collaborator Author

pdp2121 commented Apr 8, 2026

/ai-review

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.

Add integration tests for RPCs

1 participant