@@ -3,7 +3,7 @@ use acropolis_common::{
33 protocol_params:: { AlonzoParams , BabbageParams , ByronParams , ConwayParams , ShelleyParams } ,
44 rational_number:: { rational_number_from_f32, RationalNumber } ,
55 Anchor , BlockVersionData , Committee , Constitution , CostModel , Credential , DRepVotingThresholds ,
6- Era , HeavyDelegate , PoolVotingThresholds , ProtocolConsts , SoftForkRule , TxFeePolicy ,
6+ Era , HeavyDelegate , PoolId , PoolVotingThresholds , ProtocolConsts , SoftForkRule , TxFeePolicy ,
77} ;
88use anyhow:: { anyhow, bail, Result } ;
99use base64:: prelude:: * ;
@@ -183,13 +183,13 @@ fn map_byron(genesis: &byron::GenesisFile) -> Result<ByronParams> {
183183 . heavy_delegation
184184 . iter ( )
185185 . map ( |( k, v) | {
186- let k = hex :: decode ( k) ?;
186+ let k = PoolId :: try_from ( decode ( k) ? ) ?;
187187 let v = HeavyDelegate {
188- cert : hex :: decode ( v. cert . clone ( ) ) ?,
188+ cert : decode ( v. cert . clone ( ) ) ?,
189189 delegate_pk : BASE64_STANDARD . decode ( v. delegate_pk . clone ( ) ) ?,
190190 issuer_pk : BASE64_STANDARD . decode ( v. issuer_pk . clone ( ) ) ?,
191191 } ;
192- Ok :: < ( Vec < u8 > , HeavyDelegate ) , anyhow:: Error > ( ( k, v) )
192+ Ok :: < ( PoolId , HeavyDelegate ) , anyhow:: Error > ( ( k, v) )
193193 } )
194194 . collect :: < Result < _ , _ > > ( ) ?;
195195 Ok ( ByronParams {
0 commit comments