File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -540,8 +540,12 @@ impl<'a> AccountsHasher<'a> {
540540 ( num_hashes_per_chunk, levels_hashed, three_level)
541541 }
542542
543- // This function is designed to allow hashes to be located in multiple, perhaps multiply deep vecs.
544- // The caller provides a function to return a vec of hash from the source data.
543+ // This function is called at the top lover level to compute the merkle. It
544+ // takes a closure that returns an owned vec of hash data at the leaf level
545+ // of the merkle tree. The input data for this bottom level are read from a
546+ // file. For non-leaves nodes, where the input data is already in memory, we
547+ // will use `compute_merkle_root_from_slices`, which is a version that takes
548+ // a borrowed slice of hash data instead.
545549 fn compute_merkle_root_from_start < F , T > (
546550 total_hashes : usize ,
547551 fanout : usize ,
@@ -572,7 +576,6 @@ impl<'a> AccountsHasher<'a> {
572576 // initial fetch - could return entire slice
573577 let data_bytes = get_hash_slice_starting_at_index ( 0 ) ;
574578 let data: & [ T ] = bytemuck:: cast_slice ( & data_bytes) ;
575-
576579 let data_len = data. len ( ) ;
577580
578581 let result: Vec < _ > = ( 0 ..chunks)
You can’t perform that action at this time.
0 commit comments