From fb1d6c31febb29a26f68dbd2befafb13ada28c2c Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 22 Aug 2024 08:33:32 -0400 Subject: [PATCH] `KvId` --- crates/chia-datalayer/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/chia-datalayer/src/lib.rs b/crates/chia-datalayer/src/lib.rs index 91a6d8ed7..ff14facff 100644 --- a/crates/chia-datalayer/src/lib.rs +++ b/crates/chia-datalayer/src/lib.rs @@ -3,7 +3,7 @@ type TreeIndex = u32; // type Key = Vec; type Hash = [u8; 32]; -type KVId = Hash; +type KvId = Hash; #[derive(Debug, Hash, Eq, PartialEq)] @@ -88,7 +88,7 @@ pub enum RawMerkleNode { }, Leaf { parent: TreeIndex, - key_value: KVId, + key_value: KvId, hash: Hash, // TODO: kinda feels questionable having it be aware of its own location index: TreeIndex, @@ -109,7 +109,7 @@ impl RawMerkleNode { NodeType::Leaf => RawMerkleNode::Leaf { // TODO: this try from really right? parent: TreeIndex::from_be_bytes(<[u8; 4]>::try_from(&blob[0..4]).unwrap()), - key_value: KVId::try_from(&blob[4..36]).unwrap(), + key_value: KvId::try_from(&blob[4..36]).unwrap(), hash: Hash::try_from(&blob[36..68]).unwrap(), index, },