]> Untitled Git - bdk/commit
docs: address review feedback on `prev_blockhash` validation
author志宇 <hello@evanlinjin.me>
Wed, 22 Apr 2026 06:28:04 +0000 (06:28 +0000)
committer志宇 <hello@evanlinjin.me>
Wed, 22 Apr 2026 06:28:04 +0000 (06:28 +0000)
commitc486ba75865806bbe1d88c646385ac57df611ef5
tree0895eb5e576df6804be5856fa2fdc51c949d2b90
parent031b30fb3fbc19894c85dccc0d6a5515442e5bce
docs: address review feedback on `prev_blockhash` validation

- Clarify `CheckPoint::insert` eviction semantics when `data.prev_blockhash`
  conflicts with the checkpoint at `height - 1`.
- Explain placeholder handling in `merge_chains` conflict branch where
  `u.data()` may legitimately insert `None`.
- Preserve mismatch height in `merge_chains`' fallback so release-mode
  callers get a useful `try_include_height` instead of `0`.
- Reframe the "update displaces invalid block" test comment to make the
  best-effort recovery intent explicit.
- Derive `PartialEq` on `CheckPointEntry` and fix a broken intra-doc link.

Co-Authored-By: Claude Opus 4.7 (1M context) <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