Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/merkle/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ use std::hash::BuildHasher;

pub use self::proof::{MerkleProof, MerkleProofBuilder, MerkleProofExtBuilder, MerkleProofRef};
pub use self::pruned_branch::make_pruned_branch;
pub use self::update::{MerkleUpdate, MerkleUpdateBuilder};
pub use self::update::{
MerkleApplyResult, MerkleBuildResult, MerkleStats, MerkleUpdate, MerkleUpdateBuilder,
};
use crate::cell::{HashBytes, UsageTree, UsageTreeWithSubtrees};

mod proof;
Expand Down
17 changes: 13 additions & 4 deletions src/merkle/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ where
pub fn build_raw_ext<'c: 'a>(
self,
context: &'c dyn CellContext,
) -> Result<(Cell, ahash::HashSet<&'a HashBytes>), Error> {
) -> Result<(Cell, ahash::HashSet<&'a HashBytes>, usize), Error> {
let mut pruned_branches = Default::default();
let mut builder = BuilderImpl {
root: self.root,
Expand All @@ -406,7 +406,8 @@ where
prune_big_cells: self.prune_big_cells,
};
let cell = ok!(builder.build());
Ok((cell, pruned_branches))
let cells_count = builder.cells.len();
Ok((cell, pruned_branches, cells_count))
}
}

Expand All @@ -420,7 +421,14 @@ where
self,
context: &'c (dyn CellContext + Send + Sync),
split_at: ahash::HashSet<HashBytes>,
) -> Result<(Cell, dashmap::DashSet<&'a HashBytes, ahash::RandomState>), Error> {
) -> Result<
(
Cell,
dashmap::DashSet<&'a HashBytes, ahash::RandomState>,
usize,
),
Error,
> {
let pruned_branches = Default::default();
let builder = ParBuilderImpl {
root: self.root,
Expand All @@ -433,7 +441,8 @@ where
prune_big_cells: self.prune_big_cells,
};
let cell = ok!(builder.build());
Ok((cell, pruned_branches))
let cells_count = builder.cells.len();
Ok((cell, pruned_branches, cells_count))
}
}

Expand Down
Loading
Loading