Skip to content

feat: Support filtering txns by mpt_issuance_id - #3153

Open
PeterChen13579 wants to merge 4 commits into
XRPLF:developfrom
PeterChen13579:SupportAccountTxFilteringByMPTIssuanceID
Open

feat: Support filtering txns by mpt_issuance_id#3153
PeterChen13579 wants to merge 4 commits into
XRPLF:developfrom
PeterChen13579:SupportAccountTxFilteringByMPTIssuanceID

Conversation

@PeterChen13579

@PeterChen13579 PeterChen13579 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Adds an optional mpt_issuance_id field to Account_tx so that users can filter Account transactions if the transaction is involved in a specific mpt_issuance_id

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/etl/MPTHelpers.cpp 87.50% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support to filter account_tx results by a specific MPT issuance identifier, reusing ETL-side MPT parsing utilities to determine whether a transaction references an issuance.

Changes:

  • Add optional mpt_issuance_id request parameter to account_tx (validated as uint192 hex).
  • Implement issuance-reference detection via new etl::referencesMptIssuance helper and apply filtering in the handler.
  • Extend unit tests with parameter validation cases and several filter scenarios (including binary output).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/unit/rpc/handlers/AccountTxTests.cpp Adds parameter-validation cases and new scenarios validating mpt_issuance_id filtering behavior.
src/rpc/handlers/MPTHolders.cpp Adds an include needed for compilation after related MPT changes.
src/rpc/handlers/AccountTx.hpp Introduces mpt_issuance_id into the RPC spec and Input struct.
src/rpc/handlers/AccountTx.cpp Parses the new filter field and filters transactions using etl::referencesMptIssuance.
src/rpc/CMakeLists.txt Links clio_rpc against clio_etl to use the new helper.
src/etl/MPTHelpers.hpp Declares referencesMptIssuance helper for checking issuance references.
src/etl/MPTHelpers.cpp Implements issuance-reference detection by scanning metadata nodes and tx fields.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/rpc/handlers/AccountTx.hpp
Comment thread tests/unit/rpc/handlers/AccountTxTests.cpp
Comment thread src/rpc/handlers/AccountTx.cpp Outdated
@PeterChen13579 PeterChen13579 changed the title feat: Support filtering txns by mpt_id feat: Support filtering txns by mpt_issuance_id Jul 29, 2026
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.

2 participants