Skip to content

Commit 1eeda17

Browse files
authored
Trace the right CoreNodeId in protocol tracing (#1264)
2 parents ce23659 + 9f472b0 commit 1eeda17

File tree

1 file changed

+3
-5
lines changed
  • ouroboros-consensus-diffusion/src/unstable-diffusion-testlib/Test/ThreadNet

1 file changed

+3
-5
lines changed

ouroboros-consensus-diffusion/src/unstable-diffusion-testlib/Test/ThreadNet/Network.hs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,8 +1290,7 @@ directedEdgeInner registry clock (version, blockVersion) (cfg, calcMessageDelay)
12901290

12911291
atomically $ writeTVar edgeStatusVar EUp
12921292

1293-
let local = CoreId (CoreNodeId 0)
1294-
miniProtocol ::
1293+
let miniProtocol ::
12951294
String
12961295
-- ^ protocol name
12971296
-> (String -> a -> RestartCause)
@@ -1321,12 +1320,12 @@ directedEdgeInner registry clock (version, blockVersion) (cfg, calcMessageDelay)
13211320
)
13221321
where
13231322
initiatorCtx = ExpandedInitiatorContext {
1324-
eicConnectionId = ConnectionId local (fromCoreNodeId node2),
1323+
eicConnectionId = ConnectionId (fromCoreNodeId node1) (fromCoreNodeId node2),
13251324
eicControlMessage = return Continue,
13261325
eicIsBigLedgerPeer = IsNotBigLedgerPeer
13271326
}
13281327
responderCtx = ResponderContext {
1329-
rcConnectionId = ConnectionId local (fromCoreNodeId node1)
1328+
rcConnectionId = ConnectionId (fromCoreNodeId node1) (fromCoreNodeId node2)
13301329
}
13311330

13321331
(>>= withAsyncsWaitAny) $
@@ -1733,4 +1732,3 @@ instance Exception TxGenFailure
17331732
-- later.
17341733
neUnzip :: Functor f => f (a,b) -> (f a, f b)
17351734
neUnzip xs = (fst <$> xs, snd <$> xs)
1736-

0 commit comments

Comments
 (0)