]> Untitled Git - bdk/commit
test(core): add tests for CheckPoint::push and insert methods
author志宇 <hello@evanlinjin.me>
Thu, 25 Sep 2025 02:24:27 +0000 (02:24 +0000)
committer志宇 <hello@evanlinjin.me>
Wed, 22 Apr 2026 04:48:18 +0000 (04:48 +0000)
commit19b900648f9308d671849c927abf4084d6843942
treec67576c06ee5763bf4db56766ed7d65599f28a1a
parent9971fda5367cfa69917445a11c4b8c9d6de3f713
test(core): add tests for CheckPoint::push and insert methods

Add comprehensive tests for CheckPoint::push error cases:
- Push fails when height is not greater than current
- Push fails when prev_blockhash conflicts with self
- Push succeeds when prev_blockhash matches

Include tests for CheckPoint::insert conflict handling:
- Insert with conflicting prev_blockhash
- Insert purges conflicting tail
- Insert between conflicting checkpoints

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

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: valued mammal <valuedmammal@protonmail.com>
crates/core/tests/test_checkpoint.rs