Minor modification to tree_hash

This commit is contained in:
Kirk Baird 2019-01-25 16:42:19 +11:00
parent 10333cc99f
commit 9f703765aa
No known key found for this signature in database
GPG Key ID: BF864B7ED0BEA33F

View File

@ -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();