Skip to content

feat(chain): order canonical transactions for display - #2479

Open
im-xiangda-li wants to merge 1 commit into
bitcoindevkit:masterfrom
im-xiangda-li:feat/canonical-display-order
Open

im-xiangda-li wants to merge 1 commit into
bitcoindevkit:masterfrom
im-xiangda-li:feat/canonical-display-order

Conversation

@im-xiangda-li

Copy link
Copy Markdown

Closes #2247.

Description

Add CanonicalView::txs_for_display() for wallet transaction histories. It prioritizes newer chain positions among eligible transactions and always displays spenders before their known ancestors.

Notes to reviewers

The iterator builds a reverse topological order on demand. The existing canonical traversal keeps its behavior and can independently adopt the parent-first ordering proposed in #2464.

The regression test covers a child spending two outputs from a parent with no first-seen timestamp. It also checks the order of unrelated mempool transactions and confirmed transactions at different heights. All 16 canonical-view tests and the no-default-features build passed.

Changelog notice

Added CanonicalView::txs_for_display() to bdk_chain for newest-first wallet history with child-before-parent ordering.

@im-xiangda-li
im-xiangda-li requested a review from a team as a code owner November 26, 2026 00:05
@github-project-automation github-project-automation Bot moved this to Triage in BDK Chain Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

Expose a display-oriented canonical transaction ordering (newest-first, DAG-consistent)

1 participant