@@ -813,7 +813,8 @@ impl<const SYNC_COMMITTEE_SIZE: usize> TryFrom<RawClientState>
813813 epochs_per_sync_committee_period : value. epochs_per_sync_committee_period . into ( ) ,
814814 ibc_address : value. ibc_address . as_slice ( ) . try_into ( ) ?,
815815 ibc_commitments_slot : H256 :: from_slice ( & value. ibc_commitments_slot ) ,
816- trust_level : Fraction :: new ( trust_level. numerator , trust_level. denominator ) ,
816+ trust_level : Fraction :: new ( trust_level. numerator , trust_level. denominator )
817+ . map_err ( Error :: VerificationError ) ?,
817818 trusting_period : value
818819 . trusting_period
819820 . ok_or ( Error :: MissingTrustingPeriod ) ?
@@ -879,8 +880,8 @@ impl<const SYNC_COMMITTEE_SIZE: usize> From<ClientState<SYNC_COMMITTEE_SIZE>> fo
879880 ibc_address : value. ibc_address . 0 . to_vec ( ) ,
880881 ibc_commitments_slot : value. ibc_commitments_slot . as_bytes ( ) . to_vec ( ) ,
881882 trust_level : Some ( ProtoFraction {
882- numerator : value. trust_level . numerator ,
883- denominator : value. trust_level . denominator ,
883+ numerator : value. trust_level . numerator ( ) ,
884+ denominator : value. trust_level . denominator ( ) ,
884885 } ) ,
885886 trusting_period : Some ( value. trusting_period . into ( ) ) ,
886887 max_clock_drift : Some ( value. max_clock_drift . into ( ) ) ,
@@ -1059,7 +1060,7 @@ mod tests {
10591060 epochs_per_sync_committee_period : PRESET . EPOCHS_PER_SYNC_COMMITTEE_PERIOD ,
10601061 ibc_address : Address ( hex ! ( "ff77D90D6aA12db33d3Ba50A34fB25401f6e4c4F" ) ) ,
10611062 ibc_commitments_slot : keccak256 ( "ibc_commitments_slot" ) ,
1062- trust_level : Fraction :: new ( 2 , 3 ) ,
1063+ trust_level : Fraction :: new ( 2 , 3 ) . unwrap ( ) ,
10631064 trusting_period : Duration :: from_secs ( 60 * 60 * 27 ) ,
10641065 max_clock_drift : Duration :: from_secs ( 60 ) ,
10651066 latest_execution_block_number : 1 . into ( ) ,
0 commit comments