pub fn merkle_tree(&self, tree_size: usize, tree_leafs: usize) -> Result<LCTree> {
        trace!(
            "post: tree size {}, tree leafs {}, cached above base {}",
            tree_size,
            tree_leafs,
            StoreConfig::default_cached_above_base_layer(tree_leafs)
        );
        let mut config = StoreConfig::new(
            self.cache_dir_path(),
            CacheKey::CommRLastTree.to_string(),
            StoreConfig::default_cached_above_base_layer(tree_leafs),
        );
        config.size = Some(tree_size);

        let tree_r_last_store: LevelCacheStore<<DefaultTreeHasher as Hasher>::Domain, _> =
            LevelCacheStore::new_from_disk(tree_size, &config)?;
        let tree_r_last: LCTree =
            merkletree::merkle::MerkleTree::from_data_store(tree_r_last_store, tree_leafs)?;

        Ok(tree_r_last)
    }
/// Generate the merkle tree of this particular replica.
Generate the merkle tree of this particular replica.
Generate the merkle tree of this particular replica .
pub fn merkle_tree(&self, tree_size: usize, tree_leafs: usize) -> Result<LCTree> {
        trace!(
            "post: tree size {}, tree leafs {}, cached above base {}",
            tree_size,
            tree_leafs,
            StoreConfig::default_cached_above_base_layer(tree_leafs)
        );
        let mut config = StoreConfig::new(
            self.cache_dir_path(),
            CacheKey::CommRLastTree.to_string(),
            StoreConfig::default_cached_above_base_layer(tree_leafs),
        );
        config.size = Some(tree_size);
        let tree_r_last_store: LevelCacheStore<<DefaultTreeHasher as Hasher>::Domain, _> =
            LevelCacheStore::new_from_disk(tree_size, &config)?;
        let tree_r_last: LCTree =
            merkletree::merkle::MerkleTree::from_data_store(tree_r_last_store, tree_leafs)?;
        Ok(tree_r_last)
    }
pub fn merkle_tree ( & self , tree_size : usize , tree_leafs : usize ) -> Result < LCTree > { trace ! ( " " tree_size tree_leafs StoreConfig default_cached_above_base_layer ( tree_leafs ) ) ; let mut config = StoreConfig :: new ( self . cache_dir_path ( ) , CacheKey :: CommRLastTree . to_string ( ) , StoreConfig :: default_cached_above_base_layer ( tree_leafs ) , ) ; config . size = Some ( tree_size ) ; let tree_r_last_store : LevelCacheStore < < DefaultTreeHasher as Hasher > :: Domain , _ > = LevelCacheStore :: new_from_disk ( tree_size , & config ) ? ; let tree_r_last : LCTree = merkletree :: merkle :: MerkleTree :: from_data_store ( tree_r_last_store , tree_leafs ) ? ; Ok ( tree_r_last ) }
Generate the merkle tree of this particular replica.
Generate the merkle tree of this particular replica .
&self
tree_size
usize
tree_leafs
usize
&self
tree_size
usize
tree_leafs
usize