From 19b2c0d28999cec4bbaa8f8d5a39f36a5e79a0de Mon Sep 17 00:00:00 2001 From: Lars Kuhtz Date: Fri, 3 Jan 2025 14:16:36 -0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Edmund Noble --- src/Chainweb/Cut.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Chainweb/Cut.hs b/src/Chainweb/Cut.hs index a659d6e8ed..b75c22d4ed 100644 --- a/src/Chainweb/Cut.hs +++ b/src/Chainweb/Cut.hs @@ -392,7 +392,7 @@ projectChains m = HM.intersection m {-# INLINE projectChains #-} cutProjectChains :: Cut -> Cut -cutProjectChains c = unsafeMkCut v $! projectChains $ _cutHeaders c +cutProjectChains c = unsafeMkCut v $ projectChains $ _cutHeaders c where v = _chainwebVersion c {-# INLINE cutProjectChains #-} @@ -459,7 +459,7 @@ limitCut wdb h c return c | otherwise = do hdrs <- itraverse go $ view cutHeaders c - return $! unsafeMkCut v $! projectChains $ HM.mapMaybe id hdrs + return $! unsafeMkCut v $ projectChains $ HM.mapMaybe id hdrs where v = _chainwebVersion c @@ -708,9 +708,9 @@ tryMonotonicCutExtension -> m (Maybe Cut) tryMonotonicCutExtension c h = isMonotonicCutExtension c h >>= \case False -> return Nothing - True -> return $ Just + True -> return $! Just $! unsafeMkCut v - $! extendChains + $ extendChains $ set (ix' (_chainId h)) h $ _cutHeaders c where