]> Untitled Git - bdk/commit
fix(core): calling `CheckPoint::insert` with existing block must succeed
author志宇 <hello@evanlinjin.me>
Thu, 12 Sep 2024 08:44:21 +0000 (16:44 +0800)
committer志宇 <hello@evanlinjin.me>
Thu, 12 Sep 2024 13:16:46 +0000 (21:16 +0800)
commit2970b83f30ca7071f0502de395327eb3671a512b
tree41bd47f99f52fef03ccfb93bcb9e77a11f3787f9
parent8760653339d3a4c66dfa9a54a7b9d943a065f924
fix(core): calling `CheckPoint::insert` with existing block must succeed

Previously, we were panicking when the caller tried to insert a block at
height 0. However, this should succeed if the block hash does not
change.
crates/core/src/checkpoint.rs
crates/core/tests/common.rs [new file with mode: 0644]
crates/core/tests/test_checkpoint.rs [new file with mode: 0644]