From 9f71df635ca60a1414d59b4bf434500542c06d31 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Tue, 19 Dec 2023 13:51:39 -0500 Subject: [PATCH] Sketch idea for `HashValue` type to make it more clear which u64s are hash outputs. --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index fe0245c..4a61c73 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,6 +6,10 @@ mod c2_blockchain; mod c3_consensus; mod c4_framework; +//TODO This is just me scribbling a quick little idea to disambiguate the hash type throughout this project. +/// A Simple 64-bit hash value that will be used whenever a cryptographic hash is needed. +pub struct HashValue(u64); + // Simple helper to do some hashing. fn hash(t: &T) -> u64 { let mut s = DefaultHasher::new();