Expose new() only in tests.

This commit is contained in:
Sean Bowe 2021-06-24 14:16:13 -06:00
parent 709dbd07c4
commit 09029e9a96
No known key found for this signature in database
GPG Key ID: 95684257D8F8B031
1 changed files with 1 additions and 0 deletions

View File

@ -13,6 +13,7 @@ pub struct CompleteTree<H: Hashable> {
impl<H: Hashable + Clone> CompleteTree<H> {
/// Creates a new, empty binary tree of specified depth.
#[cfg(test)]
pub fn new(depth: usize, max_checkpoints: usize) -> Self {
CompleteTree {
leaves: vec![H::empty_leaf(); 1 << depth],