Skip to content

Commit 514f7c2

Browse files
committed
fix: replace 32 byte length conversion with 28 byte length for GenesisHash
Signed-off-by: William Hankins <[email protected]>
1 parent f652276 commit 514f7c2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

codec/src/map_parameters.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub fn to_hash<const N: usize>(pallas_hash: &pallas_primitives::Hash<N>) -> Hash
3737

3838
/// Convert a Pallas Hash reference to an Acropolis Hash (owned)
3939
/// Works for any hash size N
40-
pub fn genesis_to_hash(pallas_hash: &pallas_primitives::Genesishash) -> Hash<32> {
40+
pub fn genesis_to_hash(pallas_hash: &pallas_primitives::Genesishash) -> Hash<28> {
4141
Hash::try_from(pallas_hash.as_ref()).unwrap()
4242
}
4343

common/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ pub struct SPORewards {
10121012
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
10131013
pub struct GenesisKeyDelegation {
10141014
/// Genesis hash
1015-
pub genesis_hash: Hash<32>,
1015+
pub genesis_hash: Hash<28>,
10161016

10171017
/// Genesis delegate hash
10181018
pub genesis_delegate_hash: PoolId,

0 commit comments

Comments
 (0)