@@ -189,7 +189,7 @@ data TraceEvent blk =
189189 -- ^ triggered when given analysis has started
190190 | DoneEvent
191191 -- ^ triggered when analysis has ended
192- | BlockSlotEvent BlockNo SlotNo
192+ | BlockSlotEvent BlockNo SlotNo ( HeaderHash blk )
193193 -- ^ triggered when block has been found, it holds:
194194 -- * block's number
195195 -- * slot number when the block was forged
@@ -244,9 +244,10 @@ data TraceEvent blk =
244244instance HasAnalysis blk => Show (TraceEvent blk ) where
245245 show (StartedEvent analysisName) = " Started " <> (show analysisName)
246246 show DoneEvent = " Done"
247- show (BlockSlotEvent bn sn) = intercalate " \t " $ [
247+ show (BlockSlotEvent bn sn h) = intercalate " \t " $ [
248248 show bn
249249 , show sn
250+ , show h
250251 ]
251252 show (CountTxOutputsEvent bn sn cumulative count) = intercalate " \t " $ [
252253 show bn
@@ -292,7 +293,7 @@ instance HasAnalysis blk => Show (TraceEvent blk) where
292293
293294
294295{- ------------------------------------------------------------------------------
295- Analysis: show block and slot number for all blocks
296+ Analysis: show block and slot number and hash for all blocks
296297-------------------------------------------------------------------------------}
297298
298299showSlotBlockNo :: forall blk . HasAnalysis blk => Analysis blk StartFromPoint
@@ -301,7 +302,8 @@ showSlotBlockNo AnalysisEnv { db, registry, startFrom, limit, tracer } =
301302 >> pure Nothing
302303 where
303304 process :: Header blk -> IO ()
304- process hdr = traceWith tracer $ BlockSlotEvent (blockNo hdr) (blockSlot hdr)
305+ process hdr = traceWith tracer $
306+ BlockSlotEvent (blockNo hdr) (blockSlot hdr) (headerHash hdr)
305307
306308{- ------------------------------------------------------------------------------
307309 Analysis: show total number of tx outputs per block
@@ -419,7 +421,7 @@ storeLedgerStateAt slotNo (AnalysisEnv { db, registry, startFrom, cfg, limit, le
419421
420422 issueWarning blk = let event = SnapshotWarningEvent slotNo (blockSlot blk)
421423 in traceWith tracer event
422- reportProgress blk = let event = BlockSlotEvent (blockNo blk) (blockSlot blk)
424+ reportProgress blk = let event = BlockSlotEvent (blockNo blk) (blockSlot blk) (blockHash blk)
423425 in traceWith tracer event
424426
425427 storeLedgerState ::
0 commit comments