File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ import Cardano.Protocol.Crypto (Crypto)
6262import qualified Cardano.Protocol.TPraos.BHeader as SL
6363import qualified Data.ByteString.Lazy as Lazy
6464import Data.Coerce (coerce )
65+ import Data.Either (fromRight )
6566import Data.Typeable (Typeable )
6667import GHC.Generics (Generic )
6768import NoThunks.Class (NoThunks (.. ))
@@ -311,7 +312,9 @@ decodeShelleyBlock ::
311312 ShelleyCompatible proto era =>
312313 forall s .
313314 Plain. Decoder s (Lazy. ByteString -> ShelleyBlock proto era )
314- decodeShelleyBlock = eraDecoder @ era $ (. Full ) . runAnnotator <$> decCBOR
315+ decodeShelleyBlock =
316+ eraDecoder @ era $
317+ (. Full ) . (fromRight (error " TODO(geo2a): remove fromRight" ) . ) . runAnnotator <$> decCBOR
315318
316319shelleyBinaryBlockInfo ::
317320 forall proto era . ShelleyCompatible proto era => ShelleyBlock proto era -> BinaryBlockInfo
@@ -335,7 +338,9 @@ decodeShelleyHeader ::
335338 ShelleyCompatible proto era =>
336339 forall s .
337340 Plain. Decoder s (Lazy. ByteString -> Header (ShelleyBlock proto era ))
338- decodeShelleyHeader = eraDecoder @ era $ (. Full ) . runAnnotator <$> decCBOR
341+ decodeShelleyHeader =
342+ eraDecoder @ era $
343+ (. Full ) . (fromRight (error " TODO(geo2a): remove fromRight" ) . ) . runAnnotator <$> decCBOR
339344
340345{- ------------------------------------------------------------------------------
341346 Condense
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ import Control.Monad (guard)
8787import Control.Monad.Except (Except , liftEither )
8888import Control.Monad.Identity (Identity (.. ))
8989import Data.DerivingVia (InstantiatedAt (.. ))
90+ import Data.Either (fromRight )
9091import Data.Foldable (toList )
9192import Data.Measure (Measure )
9293import Data.Typeable (Typeable )
@@ -245,7 +246,7 @@ instance ShelleyCompatible proto era => FromCBOR (GenTx (ShelleyBlock proto era)
245246 fmap mkShelleyTx $
246247 unwrapCBORinCBOR $
247248 eraDecoder @ era $
248- (. Full ) . runAnnotator <$> decCBOR
249+ (. Full ) . (fromRight ( error " TODO(geo2a): remove fromRight " ) . ) . runAnnotator <$> decCBOR
249250
250251{- ------------------------------------------------------------------------------
251252 Pretty-printing
You can’t perform that action at this time.
0 commit comments