Skip to content

feat(chain): add walk_ancestors_from_root to TxGraph#2218

Open
Dmenec wants to merge 1 commit into
bitcoindevkit:masterfrom
Dmenec:feat/walk-ancestors-include-root
Open

feat(chain): add walk_ancestors_from_root to TxGraph#2218
Dmenec wants to merge 1 commit into
bitcoindevkit:masterfrom
Dmenec:feat/walk-ancestors-include-root

Conversation

@Dmenec
Copy link
Copy Markdown
Contributor

@Dmenec Dmenec commented Jun 3, 2026

Solves #2216

Description

Add walk_ancestors_from_root method to TxGraph, which mirrors the existing walk_ancestors but includes the root transaction in the iteration.

Notes to the reviewers

An alternative implementation would have been to make TxAncestors::new_include_root public directly, instead of adding a wrapper method on TxGraph. Not sure which approach is preferable here.

Changelog notice

Added

TxGraph::walk_ancestors_from_root

Checklists

All Submissions:

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

❌ Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.55%. Comparing base (47556ab) to head (9789045).

Files with missing lines Patch % Lines
crates/chain/src/tx_graph.rs 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2218      +/-   ##
==========================================
- Coverage   77.69%   77.55%   -0.14%     
==========================================
  Files          29       29              
  Lines        5801     5811      +10     
  Branches      271      271              
==========================================
  Hits         4507     4507              
- Misses       1223     1233      +10     
  Partials       71       71              
Flag Coverage Δ
rust 77.55% <0.00%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@evanlinjin

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants