From: valued mammal Date: Thu, 12 Sep 2024 19:18:01 +0000 (-0400) Subject: doc(core): document panic for `CheckPoint::insert` X-Git-Tag: v1.0.0-beta.3~2^2~1 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/struct.EncoderStringWriter.html?a=commitdiff_plain;h=e6aeaea0c69472e4c2dcf0f5e2f632f43733529d;p=bdk doc(core): document panic for `CheckPoint::insert` --- diff --git a/crates/core/src/checkpoint.rs b/crates/core/src/checkpoint.rs index 089db230..10af1327 100644 --- a/crates/core/src/checkpoint.rs +++ b/crates/core/src/checkpoint.rs @@ -171,6 +171,10 @@ impl CheckPoint { /// it. If the height already existed and has a conflicting block hash then it will be purged /// along with all block followin it. The returned chain will have a tip of the `block_id` /// passed in. Of course, if the `block_id` was already present then this just returns `self`. + /// + /// # Panics + /// + /// This panics if called with a genesis block that differs from that of `self`. #[must_use] pub fn insert(self, block_id: BlockId) -> Self { let mut cp = self.clone();