Skip to content

Commit

Permalink
Updated ouroboros-network dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
coot committed Nov 30, 2021
1 parent a74faab commit d66acbd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
4 changes: 2 additions & 2 deletions cabal.project
Expand Up @@ -235,8 +235,8 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: d613de3d872ec8b4a5da0c98afb443f322dc4dab
--sha256: 0lfbipfdrzay8v1pcazx0qgkda3d1j0505yig9jrml9j7991rmhl
tag: a157be6bb0ba42daec208f01210c4d8e814e780b
--sha256: 1hjjbz5nflj2783ffvnkm731brk528w7lgsrgcd2gl7mavz519ai
subdir:
io-sim
io-classes
Expand Down
37 changes: 21 additions & 16 deletions cardano-node/src/Cardano/Tracing/OrphanInstances/Network.hs
Expand Up @@ -901,20 +901,20 @@ instance ToJSON peerAddr => ToJSON (ConnectionId peerAddr) where
, "remoteAddress" .= toJSON remoteAddress
]

instance Aeson.ToJSON ConnectionManagerCounters where
toJSON ConnectionManagerCounters { prunableConns
, duplexConns
, uniConns
, incomingConns
, outgoingConns
} =
Aeson.object [ "kind" .= String "ConnectionManagerCounters"
, "prunable" .= toJSON prunableConns
, "duplex" .= toJSON duplexConns
, "unidirectional" .= toJSON uniConns
, "incoming" .= incomingConns
, "outgoing" .= outgoingConns
]
instance ToJSON ConnectionManagerCounters where
toJSON ConnectionManagerCounters { fullDuplexConns
, duplexConns
, unidirectionalConns
, inboundConns
, outboundConns
} =
Aeson.object [ "kind" .= String "ConnectionManagerCounters"
, "fullDuplex" .= toJSON fullDuplexConns
, "duplex" .= toJSON duplexConns
, "unidirectional" .= toJSON unidirectionalConns
, "inbound" .= inboundConns
, "outbound" .= outboundConns
]

instance ToObject (FetchDecision [Point header]) where
toObject _verb (Left decline) =
Expand Down Expand Up @@ -1286,6 +1286,9 @@ instance ToObject peer => ToObject (WithMuxBearer peer MuxTrace) where

instance Aeson.ToJSONKey RelayAccessPoint where

instance Aeson.ToJSON IP where
toJSON ip = String (pack . show $ ip)

instance Show exception => ToObject (TraceLocalRootPeers RemoteAddress exception) where
toObject _verb (TraceLocalRootDomains groups) =
mkObject [ "kind" .= String "LocalRootDomains"
Expand Down Expand Up @@ -1821,10 +1824,12 @@ instance (Show addr, Show versionNumber, Show agreedOptions, ToObject addr,
, "remoteAddress" .= toObject verb remoteAddress
, "connectionState" .= toJSON connState
]
TrPruneConnections peers ->
TrPruneConnections pruningSet numberToPrune choiceSet->
mkObject
[ "kind" .= String "PruneConnections"
, "peers" .= toJSON (toObject verb `map` peers)
, "pruningSet" .= toJSON (toObject verb `Set.map` pruningSet)
, "numberToPrune" .= numberToPrune
, "choiceSet" .= toJSON (toObject verb `Set.map` choiceSet)
]
TrConnectionCleanup connId ->
mkObject
Expand Down

0 comments on commit d66acbd

Please sign in to comment.