fn root_with_filler(&self, mut filler: PathFiller) -> MerkleNode {
        // Compute leaf root (at depth 1)
        let mut root = MerkleNode::combine(
            self.tree_type,
            0,
            &self.left.unwrap_or_else(|| filler.next(0, self)),
            &self.right.unwrap_or_else(|| filler.next(0, self)),
        );

        // Update root till currently-filled depth.
        root = self
            .parents
            .iter()
            .zip(1..)
            .fold(root, |root_cur, (parent, i)| match parent {
                Some(p) => MerkleNode::combine(self.tree_type, i, p, &root_cur),
                None => MerkleNode::combine(self.tree_type, i, &root_cur, &filler.next(i, self)),
            });

        // Update root till top
        ((self.parents.len() + 1)..self.depth).fold(root, |root_cur, i| {
            MerkleNode::combine(self.tree_type, i, &root_cur, &filler.next(i, self))
        })
    }
/// Return the current root of the Merkle Tree, uses `filler` to fill gaps
Return the current root of the Merkle Tree, uses `filler` to fill gaps
Return the current root of the Merkle Tree uses ` filler ` to fill gaps
fn root_with_filler(&self, mut filler: PathFiller) -> MerkleNode {
        // Compute leaf root (at depth 1)
        let mut root = MerkleNode::combine(
            self.tree_type,
            0,
            &self.left.unwrap_or_else(|| filler.next(0, self)),
            &self.right.unwrap_or_else(|| filler.next(0, self)),
        );
        // Update root till currently-filled depth.
        root = self
            .parents
            .iter()
            .zip(1..)
            .fold(root, |root_cur, (parent, i)| match parent {
                Some(p) => MerkleNode::combine(self.tree_type, i, p, &root_cur),
                None => MerkleNode::combine(self.tree_type, i, &root_cur, &filler.next(i, self)),
            });
        // Update root till top
        ((self.parents.len() + 1)..self.depth).fold(root, |root_cur, i| {
            MerkleNode::combine(self.tree_type, i, &root_cur, &filler.next(i, self))
        })
    }
fn root_with_filler ( & self , mut filler : PathFiller ) -> MerkleNode { // Compute leaf root (at depth 1) let mut root = MerkleNode :: combine ( self . tree_type , 0 , & self . left . unwrap_or_else ( | | filler . next ( 0 , self ) ) , & self . right . unwrap_or_else ( | | filler . next ( 0 , self ) ) , ) ; // Update root till currently-filled depth. root = self . parents . iter ( ) . zip ( 1 .. ) . fold ( root , | root_cur , ( parent , i ) | match parent { Some ( p ) => MerkleNode :: combine ( self . tree_type , i , p , & root_cur ) , None => MerkleNode :: combine ( self . tree_type , i , & root_cur , & filler . next ( i , self ) ) , } ) ; // Update root till top ( ( self . parents . len ( ) + 1 ) .. self . depth ) . fold ( root , | root_cur , i | { MerkleNode :: combine ( self . tree_type , i , & root_cur , & filler . next ( i , self ) ) } ) }
Return the current root of the Merkle Tree, uses `filler` to fill gaps
Return the current root of the Merkle Tree uses ` filler ` to fill gaps
&self
filler
PathFiller
&self
filler
PathFiller