From 514f7c2bd0bde3946065aa75ea3a0d060a5a0771 Mon Sep 17 00:00:00 2001 From: William Hankins Date: Sun, 2 Nov 2025 23:43:15 +0000 Subject: [PATCH] fix: replace 32 byte length conversion with 28 byte length for GenesisHash Signed-off-by: William Hankins --- codec/src/map_parameters.rs | 2 +- common/src/types.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codec/src/map_parameters.rs b/codec/src/map_parameters.rs index d206fa50..79525946 100644 --- a/codec/src/map_parameters.rs +++ b/codec/src/map_parameters.rs @@ -37,7 +37,7 @@ pub fn to_hash(pallas_hash: &pallas_primitives::Hash) -> Hash /// Convert a Pallas Hash reference to an Acropolis Hash (owned) /// Works for any hash size N -pub fn genesis_to_hash(pallas_hash: &pallas_primitives::Genesishash) -> Hash<32> { +pub fn genesis_to_hash(pallas_hash: &pallas_primitives::Genesishash) -> Hash<28> { Hash::try_from(pallas_hash.as_ref()).unwrap() } diff --git a/common/src/types.rs b/common/src/types.rs index 560258c2..ec53daa3 100644 --- a/common/src/types.rs +++ b/common/src/types.rs @@ -1012,7 +1012,7 @@ pub struct SPORewards { #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct GenesisKeyDelegation { /// Genesis hash - pub genesis_hash: Hash<32>, + pub genesis_hash: Hash<28>, /// Genesis delegate hash pub genesis_delegate_hash: PoolId,