]> Untitled Git - bdk/commit
fix(chain): Tx assumed to be canonical will not be forced unconfimred
author志宇 <hello@evanlinjin.me>
Wed, 11 Mar 2026 15:36:56 +0000 (15:36 +0000)
committerLeonardo Lima <oleonardolima@users.noreply.github.com>
Wed, 11 Mar 2026 17:17:54 +0000 (14:17 -0300)
commit43850b5569cb22e004652b058ce5d13ca2ccd344
tree86320058f62f2a432631bdea51fac58caf47ac5b
parentd8be40c8f73d22c3ecde4b96695f00d2a4c7f87f
fix(chain): Tx assumed to be canonical will not be forced unconfimred

Previously there was a bug where txs added in
`CanonicalizationParams::assume_canonical` were forced to always be
unconfirmed (even if it's anchored in the best chain). This commit fixes
this.

`test_assumed_canonical_with_anchor_is_confirmed` is added to ensure
expected behavior.

Co-authored-by: AayushGupta56 <aayushgupt56@gmail.com>
crates/chain/src/tx_graph.rs
crates/chain/tests/test_tx_graph.rs