]> Untitled Git - bdk/commit
refactor(chain)!: rename Anchor::confirmation_height_upper_bound
author志宇 <hello@evanlinjin.me>
Fri, 11 Sep 2026 01:51:10 +0000 (01:51 +0000)
committer志宇 <hello@evanlinjin.me>
Tue, 13 Oct 2026 01:33:18 +0000 (01:33 +0000)
commitdadeb37fd94ca7ded7adee2d2bf69047135f6d23
treef6ec0268b532eae0577e83312538cd1f5b30cdc0
parent306e052be996ed8ed62ce3e6613dadffe8e04235
refactor(chain)!: rename Anchor::confirmation_height_upper_bound

An anchor names the block that confirmed the transaction, so its height
is exact, not an upper bound. Rename
`Anchor::confirmation_height_upper_bound` to
`Anchor::confirmation_height`.

This is a hard rename with no deprecated alias. The next `bdk_chain`
release is already breaking, so a downstream `Anchor` impl overriding
the old name should fail to compile rather than be silently ignored.
`ConfirmationBlockTime`'s override is removed as it was identical to the
default.

`ChainPosition::confirmation_height_upper_bound` and
`ChainPosition::confirmations_lower_bound` keep their names. A
transaction without its own anchor can be confirmed transitively during
canonicalization, in which case the position carries a descendant's
anchor and the height really is an upper bound. Their docs, and the
false-negative caveats on `CanonicalTxOut::is_mature` and
`is_confirmed_and_spendable`, now attribute the bound to transitive
confirmation instead of to the `Anchor` implementation. A test covers
the transitive case.

No behaviour change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NND8BhEmYTYdLRv4dbUUro
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
crates/chain/src/canonical.rs
crates/chain/src/canonical_task.rs
crates/chain/src/chain_data.rs
crates/chain/src/tx_data_traits.rs
crates/chain/src/tx_graph.rs
crates/chain/tests/test_tx_graph_conflicts.rs