Skip to content

Commit

Permalink
Merge #3199
Browse files Browse the repository at this point in the history
3199: Fix rendering of RemoteConnectionId for tracing r=cblp a=cblp

https://input-output.atlassian.net/browse/CAD-3411

Co-authored-by: Yuriy Syrovetskiy <yuriy.syrovetskiy@iohk.io>
  • Loading branch information
iohk-bors[bot] and cblp committed Nov 30, 2021
2 parents 7b44ca7 + e2129c7 commit a74faab
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cardano-node/src/Cardano/Tracing/Peer.hs
Expand Up @@ -14,13 +14,12 @@ import Cardano.Prelude hiding (atomically)
import Prelude (String)

import qualified Control.Monad.Class.MonadSTM.Strict as STM

import Data.Aeson (ToJSON (..), Value (..), toJSON, (.=))
import qualified Data.Map.Strict as Map
import qualified Data.Set as Set
import qualified Data.Text as Text
import NoThunks.Class (AllowThunk (..), NoThunks)
import Text.Printf (printf)
import NoThunks.Class (NoThunks, AllowThunk (..))

import Cardano.BM.Data.LogItem (LOContent (..))
import Cardano.BM.Data.Tracer (emptyObject, mkObject)
Expand All @@ -36,7 +35,7 @@ import Ouroboros.Network.Block (unSlotNo)
import qualified Ouroboros.Network.Block as Net
import qualified Ouroboros.Network.BlockFetch.ClientRegistry as Net
import Ouroboros.Network.BlockFetch.ClientState (PeerFetchInFlight (..),
PeerFetchStatus (..), readFetchClientState)
PeerFetchStatus (..), readFetchClientState)

import Cardano.Tracing.Kernel

Expand All @@ -57,7 +56,7 @@ ppPeer (Peer cid _af status inflight) =
Text.pack $ printf "%-15s %-8s %s" (ppCid cid) (ppStatus status) (ppInFlight inflight)

ppCid :: RemoteConnectionId -> String
ppCid = takeWhile (/= ':') . show . remoteAddress
ppCid = show . remoteAddress

ppInFlight :: PeerFetchInFlight header -> String
ppInFlight f = printf
Expand Down

0 comments on commit a74faab

Please sign in to comment.