Skip to content

Commit

Permalink
Split counters from tracers
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Jan 29, 2021
1 parent 62154cb commit c82c3e7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ouroboros-consensus/src/Ouroboros/Consensus/Node.hs
Expand Up @@ -117,7 +117,10 @@ import Ouroboros.Consensus.Storage.VolatileDB
-- | Arguments expected from any invocation of 'runWith'
data RunNodeArgs m addrNTN addrNTC blk = RunNodeArgs {
-- | Consensus tracers
rnTraceConsensus :: Tracers m (ConnectionId addrNTN) (ConnectionId addrNTC) blk
rnCountConsensus :: Tracers m (ConnectionId addrNTN) (ConnectionId addrNTC) blk

-- | Consensus tracers
, rnTraceConsensus :: Tracers m (ConnectionId addrNTN) (ConnectionId addrNTC) blk

-- | Protocol tracers for node-to-node communication
, rnTraceNTN :: NTN.Tracers m (ConnectionId addrNTN) blk DeserialiseFailure
Expand Down Expand Up @@ -284,6 +287,7 @@ runWith RunNodeArgs{..} LowLevelRunNodeArgs{..} =
llrnKeepAliveRng
cfg
blockForging
rnCountConsensus
rnTraceConsensus
btime
chainDB
Expand Down Expand Up @@ -480,6 +484,7 @@ mkNodeKernelArgs
-> TopLevelConfig blk
-> m [BlockForging m blk]
-> Tracers m (ConnectionId addrNTN) (ConnectionId addrNTC) blk
-> Tracers m (ConnectionId addrNTN) (ConnectionId addrNTC) blk
-> BlockchainTime m
-> ChainDB m blk
-> m (NodeKernelArgs m (ConnectionId addrNTN) (ConnectionId addrNTC) blk)
Expand All @@ -489,13 +494,14 @@ mkNodeKernelArgs
keepAliveRng
cfg
initBlockForging
counters
tracers
btime
chainDB
= do
blockForging <- initBlockForging
return NodeKernelArgs
{ tracers
{ tracers = counters <> tracers
, registry
, cfg
, btime
Expand Down

0 comments on commit c82c3e7

Please sign in to comment.