mirror of
https://github.com/XRPLF/clio.git
synced 2026-07-23 15:10:23 +00:00
## Summary Fixes incomplete MPT holder indexing in ETL. Previously, Clio only indexed MPT holders when an `ltMPTOKEN` ledger node was created by an `MPTokenAuthorize` transaction. However, with future amendments, XRPL can also create `ltMPTOKEN` nodes as part of other successful transactions, such as `Payment`, when a holder receives an MPT. Those holders were silently skipped and therefore missing from the `mpt_holders` RPC results. This change makes MPT holder indexing metadata-driven instead of transaction-type-driven. ETL now scans successful transaction metadata for newly created `ltMPTOKEN` nodes and writes every holder it finds. ## What Changed - MPT holder extraction now works for any successful transaction that creates an `ltMPTOKEN`. - Multiple MPT holders created in a single transaction are all indexed. - The `mpt_holders` table is kept consistent with ledger metadata instead of relying on assumptions about which transaction types can create holder nodes. - Added regression coverage for MPT holders created by a `Payment` transaction. ## Testing - `build/clio_tests '--gtest_filter=MPTExtTests.*'` - `clang-tidy -p build src/etl/MPTHelpers.cpp src/etl/MPTHelpers.hpp src/etl/impl/ext/MPT.cpp tests/unit/etl/ext/MPTTests.cpp`