Skip to content

feat(core): expose BlockTreeEntry::ancestor#164

Merged
alexanderwiederin merged 1 commit into
sedited:masterfrom
pzafonte:expose-block-tree-entry-get-ancestor
Apr 29, 2026
Merged

feat(core): expose BlockTreeEntry::ancestor#164
alexanderwiederin merged 1 commit into
sedited:masterfrom
pzafonte:expose-block-tree-entry-get-ancestor

Conversation

@pzafonte
Copy link
Copy Markdown
Contributor

@pzafonte pzafonte commented Apr 24, 2026

Exposes btck_block_tree_entry_get_ancestor as BlockTreeEntry::ancestor in the Rust bindings. Returns Option and guards against height < 0 or height > self.height() before calling into the C API.

Closes #162.

Copy link
Copy Markdown
Collaborator

@alexanderwiederin alexanderwiederin left a comment

Choose a reason for hiding this comment

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

Cool! Let's get #166 in first and you can develop against the pulled in C API. No need to make the changes manually.

Comment thread src/core/block_tree_entry.rs Outdated
@sedited
Copy link
Copy Markdown
Owner

sedited commented Apr 26, 2026

Needs a rebase now :)

@pzafonte pzafonte force-pushed the expose-block-tree-entry-get-ancestor branch from 78ec3f8 to 9513a36 Compare April 26, 2026 13:36
@pzafonte
Copy link
Copy Markdown
Contributor Author

Ah! Was unaware of the process involved in updating the C API, good to know moving forward. I rebased, and added respective test cases in the latest commit.

Copy link
Copy Markdown
Collaborator

@alexanderwiederin alexanderwiederin left a comment

Choose a reason for hiding this comment

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

Small suggestion to improve the docs and I think we are good to go!

Comment thread src/core/block_tree_entry.rs Outdated
@alexanderwiederin
Copy link
Copy Markdown
Collaborator

alexanderwiederin commented Apr 29, 2026

Also, please make an entry to CHANGELOG.md

Exposes btck_block_tree_entry_get_ancestor as BlockTreeEntry::ancestor
in the Rust bindings. Returns Option<BlockTreeEntry> and guards against
height < 0 or height > self.height() before calling into the C API.
@pzafonte pzafonte force-pushed the expose-block-tree-entry-get-ancestor branch from 9513a36 to bb6fd30 Compare April 29, 2026 13:43
@pzafonte
Copy link
Copy Markdown
Contributor Author

Updated the doc and changelog in bb6fd30

@alexanderwiederin
Copy link
Copy Markdown
Collaborator

Looks good - thanks!

@alexanderwiederin alexanderwiederin merged commit 8507622 into sedited:master Apr 29, 2026
11 checks passed
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.

Expose btck_block_tree_entry_get_ancestor from bitcoin/bitcoin#34885

3 participants