Skip to content

Commit d3e1fb3

Browse files
cootbolt12
authored andcommitted
Compatibility with ouroboros-network-0.8.2.0
1 parent dd71250 commit d3e1fb3

File tree

2 files changed

+11
-1
lines changed
  • cardano-node/src/Cardano

2 files changed

+11
-1
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,10 @@ instance LogFormatting (TracePeerSelection SockAddr) where
379379
forMachine _dtal (TraceChurnMode c) =
380380
mconcat [ "kind" .= String "ChurnMode"
381381
, "event" .= show c ]
382+
forMachine _dtal (TraceKnownInboundConnection addr sharing) =
383+
mconcat [ "kind" .= String "KnownInboundConnection"
384+
, "peer" .= toJSON addr
385+
, "peerSharing" .= String (pack . show $ sharing) ]
382386
forHuman = pack . show
383387

384388
instance MetaTrace (TracePeerSelection SockAddr) where
@@ -442,6 +446,8 @@ instance MetaTrace (TracePeerSelection SockAddr) where
442446
Namespace [] ["ChurnWait"]
443447
namespaceFor TraceChurnMode {} =
444448
Namespace [] ["ChurnMode"]
449+
namespaceFor TraceKnownInboundConnection {} =
450+
Namespace [] ["KnownInboundConnection"]
445451

446452
severityFor (Namespace [] ["LocalRootPeersChanged"]) _ = Just Notice
447453
severityFor (Namespace [] ["TargetsChanged"]) _ = Just Notice
@@ -472,6 +478,7 @@ instance MetaTrace (TracePeerSelection SockAddr) where
472478
severityFor (Namespace [] ["GovernorWakeup"]) _ = Just Info
473479
severityFor (Namespace [] ["ChurnWait"]) _ = Just Info
474480
severityFor (Namespace [] ["ChurnMode"]) _ = Just Info
481+
severityFor (Namespace [] ["KnownInboundConnection"]) _ = Just Info
475482
severityFor _ _ = Nothing
476483

477484
documentFor (Namespace [] ["LocalRootPeersChanged"]) = Just ""
@@ -524,6 +531,8 @@ instance MetaTrace (TracePeerSelection SockAddr) where
524531
documentFor (Namespace [] ["GovernorWakeup"]) = Just ""
525532
documentFor (Namespace [] ["ChurnWait"]) = Just ""
526533
documentFor (Namespace [] ["ChurnMode"]) = Just ""
534+
documentFor (Namespace [] ["KnownInboundConnection"]) = Just
535+
"An inbound connection was added to known set of outbound governor"
527536
documentFor _ = Nothing
528537

529538
allNamespaces = [
@@ -556,6 +565,7 @@ instance MetaTrace (TracePeerSelection SockAddr) where
556565
, Namespace [] ["GovernorWakeup"]
557566
, Namespace [] ["ChurnWait"]
558567
, Namespace [] ["ChurnMode"]
568+
, Namespace [] ["KnownInboundConnection"]
559569
]
560570

561571
--------------------------------------------------------------------------------

cardano-node/src/Cardano/Tracing/OrphanInstances/Network.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ instance HasSeverityAnnotation [TraceLabelPeer peer (FetchDecision [Point header
178178
fetchDecisionSeverity fd =
179179
case fd of
180180
Left FetchDeclineChainNotPlausible -> Debug
181-
Left FetchDeclineChainNoIntersection -> Notice
181+
Left FetchDeclineChainIntersectionTooDeep -> Notice
182182
Left FetchDeclineAlreadyFetched -> Debug
183183
Left FetchDeclineInFlightThisPeer -> Debug
184184
Left FetchDeclineInFlightOtherPeer -> Debug

0 commit comments

Comments
 (0)