Skip to content

Commit

Permalink
doc(core): document panic for CheckPoint::insert
Browse files Browse the repository at this point in the history
  • Loading branch information
ValuedMammal committed Sep 12, 2024
1 parent 2970b83 commit e6aeaea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/core/src/checkpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit e6aeaea

Please sign in to comment.