fixed CanonicalReason::Assumed to check for direct anchor when no descendant exists#2110
Closed
AayushGupta56 wants to merge 2 commits intobitcoindevkit:masterfrom
Closed
fixed CanonicalReason::Assumed to check for direct anchor when no descendant exists#2110AayushGupta56 wants to merge 2 commits intobitcoindevkit:masterfrom
AayushGupta56 wants to merge 2 commits intobitcoindevkit:masterfrom
Conversation
Author
|
@ValuedMammal can you please review this ? |
Member
|
@AayushGupta56 thanks for the PR. Please add some tests! |
Author
added a test in |
5 tasks
Member
|
@AayushGupta56 Thanks for working on this!
Therefore I will close this PR. I've added you as a co-author of #2150 - let's continue the conversation there. |
evanlinjin
added a commit
that referenced
this pull request
Mar 12, 2026
…confirmed 43850b5 fix(chain): Tx assumed to be canonical will not be forced unconfimred (志宇) Pull request description: ### Description Fixes #2088 Depends on #2148 Backport of #2110 ### Changelog notice ```md Fixed: - Previously, assumed-canonical transactions always became unconfirmed even though the transaction may be anchored in the best chain. ``` ### Checklists #### All Submissions: * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) #### New Features: * [x] I've added tests for the new feature * [x] I've added docs for the new feature #### Bugfixes: * [x] I've added tests to reproduce the issue which are now passing * [x] I'm linking the issue being fixed by this PR ACKs for top commit: luisschwab: ACK 43850b5 notmandatory: ACK 43850b5 Tree-SHA512: 72fa42111a470e4ab52b92213b54d5f6a1521e4994258a41764b18c141fcbc47d4ff58d9e5cdb5cd4dfae151e80e26b64eefc8e735e6c71768e114cefcc3ef8c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #2088
Summary :- When a transaction is both in
assume_canonicaland has adirect anchor, it was incorrectly returned asChainPosition::Unconfirmed. This fix adds a check for a direct anchor in theNonedescendant case, returningChainPosition::Confirmedwhen an anchor exists.