Skip to content

Commit 9f22fdf

Browse files
jasagredoana-pantilie
authored andcommitted
Force accumulated state of the withReplayedBlock MVar
1 parent 325af9e commit 9f22fdf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cardano-node/src/Cardano/Node/Tracing/Tracers/BlockReplayProgress.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE BangPatterns #-}
12
{-# LANGUAGE RecordWildCards #-}
23
{-# LANGUAGE TupleSections #-}
34

@@ -96,7 +97,7 @@ withReplayedBlock tr = do
9697
-> (LoggingContext, Either TraceControl (ChainDB.TraceEvent blk))
9798
-> IO (Maybe (LoggingContext, Either TraceControl ReplayBlockStats))
9899
process var (ctx, Right msg) = modifyMVar var $ \st -> do
99-
let (st', mbStats) = mbProduceBlockStats msg st
100+
let !(!st', mbStats) = mbProduceBlockStats msg st
100101
pure (st', fmap ((ctx,) . Right) mbStats)
101102
process _ (ctx, Left control) = pure (Just (ctx, Left control))
102103

0 commit comments

Comments
 (0)