From efac432128ad0fbc37803170307bb15aaffbc7eb Mon Sep 17 00:00:00 2001 From: NikVolf Date: Tue, 3 Sep 2019 18:13:33 +0300 Subject: [PATCH] remove todo and de-pub --- src/node_data.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/node_data.rs b/src/node_data.rs index 10bb5b3..23452c2 100644 --- a/src/node_data.rs +++ b/src/node_data.rs @@ -20,7 +20,7 @@ pub struct NodeData { pub shielded_tx: u64, } -pub fn blake2b_personal(personalization: &[u8], input: &[u8]) -> [u8; 32] { +fn blake2b_personal(personalization: &[u8], input: &[u8]) -> [u8; 32] { let mut hasher = Blake2b::with_params(32, &[], &[], personalization); hasher.update(input); let mut result = [0u8; 32]; @@ -28,7 +28,7 @@ pub fn blake2b_personal(personalization: &[u8], input: &[u8]) -> [u8; 32] { result } -pub fn personalization(branch_id: u32) -> [u8; 16] { +fn personalization(branch_id: u32) -> [u8; 16] { let mut result = [0u8; 16]; result[..12].copy_from_slice(b"ZcashHistory"); LittleEndian::write_u32(&mut result[12..], branch_id); @@ -55,7 +55,6 @@ impl NodeData { ); NodeData { - // TODO: hash children consensus_branch_id: left.consensus_branch_id, subtree_commitment: hash, start_time: left.start_time, @@ -64,7 +63,6 @@ impl NodeData { end_target: right.end_target, start_sapling_root: left.start_sapling_root, end_sapling_root: right.end_sapling_root, - subtree_total_work: left.subtree_total_work + right.subtree_total_work, start_height: left.start_height, end_height: right.end_height,