diff --git a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Util/CBOR.hs b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Util/CBOR.hs index 1ecdc42d10..d90c0991cd 100644 --- a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Util/CBOR.hs +++ b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Util/CBOR.hs @@ -197,11 +197,11 @@ readIncremental = \(SomeHasFS hasFS) decoder fp -> do -> CRC -> CBOR.R.IDecode (U.PrimState m) a -> m (Either ReadIncrementalErr (a, CRC)) - go hasFS@HasFS{..} h checksum (CBOR.R.Partial k) = do + go hasFS@HasFS{..} h !checksum (CBOR.R.Partial k) = do bs <- hGetSome h (fromIntegral defaultChunkSize) dec' <- U.stToIO $ k (checkEmpty bs) go hasFS h (updateCRC bs checksum) dec' - go _ _ checksum (CBOR.R.Done leftover _ a) = + go _ _ !checksum (CBOR.R.Done leftover _ a) = return $ if BS.null leftover then Right (a, checksum) else Left $ TrailingBytes leftover