Expose new() only in tests.
This commit is contained in:
parent
709dbd07c4
commit
09029e9a96
|
@ -13,6 +13,7 @@ pub struct CompleteTree<H: Hashable> {
|
||||||
|
|
||||||
impl<H: Hashable + Clone> CompleteTree<H> {
|
impl<H: Hashable + Clone> CompleteTree<H> {
|
||||||
/// Creates a new, empty binary tree of specified depth.
|
/// Creates a new, empty binary tree of specified depth.
|
||||||
|
#[cfg(test)]
|
||||||
pub fn new(depth: usize, max_checkpoints: usize) -> Self {
|
pub fn new(depth: usize, max_checkpoints: usize) -> Self {
|
||||||
CompleteTree {
|
CompleteTree {
|
||||||
leaves: vec![H::empty_leaf(); 1 << depth],
|
leaves: vec![H::empty_leaf(); 1 << depth],
|
||||||
|
|
Loading…
Reference in New Issue