From cb818ecbe3798d35ba78b0ccb74b11abdd7d4c2b Mon Sep 17 00:00:00 2001 From: NikVolf Date: Fri, 11 Oct 2019 08:04:42 +0300 Subject: [PATCH] serialization sizes notice --- src/node_data.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/node_data.rs b/src/node_data.rs index a018daa..5d7535b 100644 --- a/src/node_data.rs +++ b/src/node_data.rs @@ -3,7 +3,19 @@ use bigint::U256; use blake2::Params as Blake2Params; /// Maximum serialized size of the node metadata. -pub const MAX_NODE_DATA_SIZE: usize = 32 + 4 + 4 + 4 + 4 + 32 + 32 + 32 + 9 + 9 + 9; // 171 +pub const MAX_NODE_DATA_SIZE: usize = + 32 + // subtree commitment + 4 + // start time + 4 + // end time + 4 + // start target + 4 + // end target + 32 + // start sapling tree root + 32 + // end sapling tree root + 32 + // subtree total work + 9 + // start height (compact uint) + 9 + // end height (compact uint) + 9; // shielded tx count (compact uint) + // = total of 171 /// Node metadata. #[repr(C)]