Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Edmund Noble <[email protected]>
  • Loading branch information
larskuhtz and edmundnoble committed Jan 3, 2025
1 parent 307629d commit 19b2c0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Chainweb/Cut.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 #-}
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 19b2c0d

Please sign in to comment.