mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 01:05:47 +00:00
Minor modification to tree_hash
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user