Skip to content

Commit

Permalink
Merge pull request #111 from ec2/ec2/expose_max_checkpoint
Browse files Browse the repository at this point in the history
Add max_checkpoints getter on ShardTree
  • Loading branch information
nuttycom authored Sep 8, 2024
2 parents f3919df + 0e9d4d6 commit 0f76ad8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions shardtree/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ impl<
&mut self.store
}

/// Returns the maximum number of checkpoints to retain before pruning.
pub fn max_checkpoints(&self) -> usize {
self.max_checkpoints
}

/// Returns the root address of the tree.
pub fn root_addr() -> Address {
Address::from_parts(Level::from(DEPTH), 0)
Expand Down

0 comments on commit 0f76ad8

Please sign in to comment.