]> Untitled Git - bdk/commit
fix(bitcoind_rpc): emit invalidated heights when start_height is above agreement...
author志宇 <hello@evanlinjin.me>
Mon, 6 Apr 2026 16:24:12 +0000 (16:24 +0000)
committer志宇 <hello@evanlinjin.me>
Thu, 23 Apr 2026 16:48:22 +0000 (16:48 +0000)
commit76b653007d63803a33668dcd51f23085b71c3911
treebfd40e1a634e0fc0feec365e639cc2838e13b85b
parent10d9333ab34a0c10912c732958a48b6269924e91
fix(bitcoind_rpc): emit invalidated heights when start_height is above agreement point

When a reorg drops the agreement point below `start_height`, the emitter
would skip directly to `start_height`, producing a checkpoint that could
not connect with the caller's local chain (`CannotConnectError`).

Fix: override `start_height` to the agreement height when a reorg is
detected (agreement point below both `start_height` and `last_cp`), so
the emitter revisits the invalidated block heights.
crates/bitcoind_rpc/src/lib.rs
crates/bitcoind_rpc/tests/test_emitter.rs