Minor modification to tree_hash
This commit is contained in:
parent
10333cc99f
commit
9f703765aa
@ -11,7 +11,7 @@ pub trait TreeHash {
|
|||||||
/// Note that this will consume 'list'.
|
/// Note that this will consume 'list'.
|
||||||
pub fn merkle_hash(list: &mut Vec<Vec<u8>>) -> Vec<u8> {
|
pub fn merkle_hash(list: &mut Vec<Vec<u8>>) -> Vec<u8> {
|
||||||
// flatten list
|
// flatten list
|
||||||
let (chunk_size, mut chunkz) = list_to_blob(list);
|
let (mut chunk_size, mut chunkz) = list_to_blob(list);
|
||||||
|
|
||||||
// get data_len as bytes. It will hashed will the merkle root
|
// get data_len as bytes. It will hashed will the merkle root
|
||||||
let datalen = list.len().to_le_bytes();
|
let datalen = list.len().to_le_bytes();
|
||||||
|
Loading…
Reference in New Issue
Block a user