From a9efb8715e229bfd7ee9cb6e086fb60e31b024f7 Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 22 Jun 2020 10:17:34 +1000 Subject: [PATCH] chain: Update the note about time truncation --- zebra-chain/src/block.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zebra-chain/src/block.rs b/zebra-chain/src/block.rs index e2058fc46..4392db124 100644 --- a/zebra-chain/src/block.rs +++ b/zebra-chain/src/block.rs @@ -146,7 +146,8 @@ impl ZcashSerialize for BlockHeader { writer.write_all(&self.merkle_root_hash.0[..])?; writer.write_all(&self.final_sapling_root_hash.0[..])?; // this is a truncating cast, rather than a saturating cast - // but u32 times are valid until 2106 + // but u32 times are valid until 2106, and our block verification time + // checks should detect any truncation. writer.write_u32::(self.time.timestamp() as u32)?; writer.write_u32::(self.bits)?; writer.write_all(&self.nonce[..])?;