Skip to content

Commit e6aeaea

Browse files
committed
doc(core): document panic for CheckPoint::insert
1 parent 2970b83 commit e6aeaea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/core/src/checkpoint.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ impl CheckPoint {
171171
/// it. If the height already existed and has a conflicting block hash then it will be purged
172172
/// along with all block followin it. The returned chain will have a tip of the `block_id`
173173
/// passed in. Of course, if the `block_id` was already present then this just returns `self`.
174+
///
175+
/// # Panics
176+
///
177+
/// This panics if called with a genesis block that differs from that of `self`.
174178
#[must_use]
175179
pub fn insert(self, block_id: BlockId) -> Self {
176180
let mut cp = self.clone();

0 commit comments

Comments
 (0)