From 0e9d4d635af5c7dff8b934017546df80848e6330 Mon Sep 17 00:00:00 2001 From: Eric Tu Date: Fri, 6 Sep 2024 12:14:28 -0400 Subject: [PATCH] Add max_checkpoints getter --- shardtree/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shardtree/src/lib.rs b/shardtree/src/lib.rs index 49493ed..2ad58f8 100644 --- a/shardtree/src/lib.rs +++ b/shardtree/src/lib.rs @@ -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)