]> Untitled Git - bdk/commit
fix(chain)!: make genesis immutable in `merge_chains`
author志宇 <hello@evanlinjin.me>
Wed, 18 Feb 2026 17:33:29 +0000 (17:33 +0000)
committer志宇 <hello@evanlinjin.me>
Wed, 22 Apr 2026 04:48:19 +0000 (04:48 +0000)
commitef35b199376b3b88bc7b8985aa1afa6c81bda5c1
treeb851987ab23cd5ecd186bb15113c442e2868cab8
parentd8cb41f2c22ed684fe493b29c86de02ddc921423
fix(chain)!: make genesis immutable in `merge_chains`

Prevent `merge_chains` from replacing the genesis block when original
and update disagree on the genesis hash. This aligns with
`CheckPoint::insert` which already panics on genesis replacement.

Also update the "fix blockhash before agreement point" test to operate
at a non-genesis height and add a new test for conflicting genesis.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
crates/chain/src/local_chain.rs
crates/chain/tests/test_local_chain.rs