File tree Expand file tree Collapse file tree
cardano-node/src/Cardano/Node/Tracing/Tracers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,13 +100,17 @@ calculateForgingStats stats _context
100100 TraceNodeCannotForge {} =
101101 pure $ stats { fsNodeCannotForgeNum = fsNodeCannotForgeNum stats + 1 }
102102calculateForgingStats stats _context
103- TraceNodeIsLeader {} =
104- pure $ stats { fsNodeIsLeaderNum = fsNodeIsLeaderNum stats + 1 }
103+ (TraceNodeIsLeader (SlotNo slot)) =
104+ pure $ stats { fsNodeIsLeaderNum = fsNodeIsLeaderNum stats + 1
105+ , fsLastSlot = fromIntegral slot }
105106calculateForgingStats stats _context
106107 TraceForgedBlock {} =
107108 pure $ stats { fsBlocksForgedNum = fsBlocksForgedNum stats + 1 }
108109calculateForgingStats stats _context
109110 (TraceNodeNotLeader (SlotNo slot')) =
111+ -- Node is not a leader again: The number of blocks forged by
112+ -- this node should now be equal to the number of slots when
113+ -- this node was a leader.
110114 let slot = fromIntegral slot'
111115 in if fsLastSlot stats == 0 || succ (fsLastSlot stats) == slot
112116 then pure $ stats { fsLastSlot = slot }
You can’t perform that action at this time.
0 commit comments