]> Untitled Git - bdk/commit
docs(core): require `CheckPoint` data to be determined by its block hash
author志宇 <hello@evanlinjin.me>
Thu, 15 Oct 2026 10:11:16 +0000 (10:11 +0000)
committer志宇 <hello@evanlinjin.me>
Thu, 15 Oct 2026 10:11:16 +0000 (10:11 +0000)
commitfbe1aa6335276b86f6d35fa409f473f8c797e02f
tree382e405be98c8731cd3c313a7956b649d31acfd1
parent1fedce6eefae590ee002364cdc7d9b0512b4119f
docs(core): require `CheckPoint` data to be determined by its block hash

The `ToBlockHash` docs allowed data types with extra fields that the
block hash does not commit to. `CheckPoint` and `LocalChain` treat data
with equal hashes as interchangeable, so such fields could be silently
kept or dropped. State that the data must be fully determined by its
block hash and that anything else belongs outside the checkpoint.

Make the `BlockWithTime` test helper commit to its time field so it
follows the rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
crates/core/src/checkpoint.rs
crates/core/tests/test_checkpoint.rs