@@ -40,12 +40,9 @@ module Cardano.Tracing.OrphanInstances.Common
4040 ) where
4141
4242import Data.Aeson hiding (Value )
43- import qualified Data.ByteString.Base16 as B16
44- import qualified Data.ByteString.Short as SBS
4543import Data.Scientific (coefficient )
4644import Data.Text (Text )
4745import qualified Data.Text as Text
48- import qualified Data.Text.Encoding as Text
4946import Data.Void (Void )
5047import Network.Socket (PortNumber )
5148import Text.Read (readMaybe )
@@ -59,9 +56,6 @@ import Cardano.BM.Tracing (HasPrivacyAnnotation (..), HasSeverityAnnot
5956 Severity (.. ), ToObject (.. ), Tracer (.. ), TracingVerbosity (.. ),
6057 Transformable (.. ))
6158import Cardano.Node.Handlers.Shutdown ()
62- import Ouroboros.Consensus.Byron.Ledger.Block (ByronHash (.. ))
63- import Ouroboros.Consensus.HardFork.Combinator (OneEraHash (.. ))
64- import Ouroboros.Network.Block (HeaderHash , Tip (.. ))
6559-- | A bit of a weird one, but needed because some of the very general
6660-- consensus interfaces are sometimes instantiated to 'Void', when there are
6761-- no cases needed.
@@ -88,21 +82,6 @@ instance FromJSON PortNumber where
8882 parseJSON invalid = fail $ " Parsing of port number failed due to type mismatch. "
8983 <> " Encountered: " <> show invalid
9084
91- instance ToJSON (HeaderHash blk ) => ToJSON (Tip blk ) where
92- toJSON TipGenesis = object [ " genesis" .= True ]
93- toJSON (Tip slotNo headerHash blockNo) =
94- object
95- [ " slotNo" .= slotNo
96- , " headerHash" .= headerHash
97- , " blockNo" .= blockNo
98- ]
99-
100- instance ToJSON (OneEraHash xs ) where
101- toJSON (OneEraHash bs) =
102- toJSON . Text. decodeLatin1 . B16. encode . SBS. fromShort $ bs
103-
104- deriving newtype instance ToJSON ByronHash
105-
10685instance HasPrivacyAnnotation ResourceStats
10786instance HasSeverityAnnotation ResourceStats where
10887 getSeverityAnnotation _ = Info
0 commit comments