• Home
  • Raw
  • Download

Lines Matching refs:tree

196         let mut tree = MerkleLeaves::new();  in merkle_tree_non_sequential()  localVariable
200 tree.update_hash(1, &hash, CHUNK_SIZE * 2); in merkle_tree_non_sequential()
201 tree.update_hash(3, &hash, CHUNK_SIZE * 4); in merkle_tree_non_sequential()
202 tree.update_hash(0, &hash, CHUNK_SIZE); in merkle_tree_non_sequential()
203 tree.update_hash(2, &hash, CHUNK_SIZE * 3); in merkle_tree_non_sequential()
207 tree.calculate_fsverity_digest()? in merkle_tree_non_sequential()
214 let mut tree = MerkleLeaves::new(); in merkle_tree_grow_leaves() localVariable
215 tree.update_hash(0, &[42; HASH_SIZE], CHUNK_SIZE); // fake hash of a CHUNK_SIZE block in merkle_tree_grow_leaves()
218 tree.resize(4096 * 3 - 100); in merkle_tree_grow_leaves()
220 assert!(tree.is_index_valid(0)); in merkle_tree_grow_leaves()
221 assert!(tree.is_index_valid(1)); in merkle_tree_grow_leaves()
222 assert!(tree.is_index_valid(2)); in merkle_tree_grow_leaves()
223 assert!(!tree.is_index_valid(3)); in merkle_tree_grow_leaves()
224 assert!(tree.is_consistent(1, &Sha256Hasher::HASH_OF_4096_ZEROS)); in merkle_tree_grow_leaves()
225 assert!(tree.is_consistent(2, &Sha256Hasher::HASH_OF_4096_ZEROS)); in merkle_tree_grow_leaves()
231 let mut tree = MerkleLeaves::new(); in merkle_tree_shrink_leaves() localVariable
232 tree.update_hash(0, &[42; HASH_SIZE], CHUNK_SIZE); in merkle_tree_shrink_leaves()
233 tree.update_hash(0, &[42; HASH_SIZE], CHUNK_SIZE * 3); in merkle_tree_shrink_leaves()
236 tree.resize(CHUNK_SIZE as usize * 2 - 100); in merkle_tree_shrink_leaves()
238 assert!(tree.is_index_valid(0)); in merkle_tree_shrink_leaves()
239 assert!(tree.is_index_valid(1)); in merkle_tree_shrink_leaves()
240 assert!(!tree.is_index_valid(2)); in merkle_tree_shrink_leaves()
243 assert!(tree.is_consistent(1, &Sha256Hasher::HASH_OF_4096_ZEROS)); in merkle_tree_shrink_leaves()
248 let mut tree = MerkleLeaves::new(); in generate_fsverity_digest_sequentially() localVariable
255 tree.update_hash(index, &hash, CHUNK_SIZE * index as u64 + chunk.len() as u64); in generate_fsverity_digest_sequentially()
257 Ok(tree.calculate_fsverity_digest()?) in generate_fsverity_digest_sequentially()