]> Untitled Git - bdk/commit
test(chain): make `TestLocalChain` generic and add `prev_blockhash` test
author志宇 <hello@evanlinjin.me>
Wed, 4 Feb 2026 15:29:40 +0000 (15:29 +0000)
committer志宇 <hello@evanlinjin.me>
Wed, 22 Apr 2026 04:48:18 +0000 (04:48 +0000)
commit3df06096f9209a0ed12e109e0d809174a7b1a73b
tree0a7972ed377b83d6eff6fee3b23f1f9d889285dd
parentc314b2567b2574da38e060bb57c02c9929082c08
test(chain): make `TestLocalChain` generic and add `prev_blockhash` test

Make `TestLocalChain` and `ExpectedResult` generic over checkpoint data
type `D`, allowing the same test infrastructure to work with both
`BlockHash` and `TestBlock` types.

Add `merge_chains_with_prev_blockhash` test to verify that `prev_blockhash`
correctly invalidates conflicting blocks and connects disjoint chains.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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