Skip to content

Commit

Permalink
Add HasKESMetricsData constraint to TraceConstraints
Browse files Browse the repository at this point in the history
  • Loading branch information
intricate committed Oct 22, 2020
1 parent dad9712 commit 2614d8c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions cardano-node/src/Cardano/Node/Protocol/Types.hs
Expand Up @@ -23,7 +23,6 @@ import qualified Ouroboros.Consensus.Cardano as Consensus (Protocol)
import Ouroboros.Consensus.Node.Run (RunNode)

import Cardano.Tracing.Constraints (TraceConstraints)
import Cardano.Tracing.Metrics (HasKESMetricsData)

data Protocol = ByronProtocol
| ShelleyProtocol
Expand All @@ -50,8 +49,7 @@ instance FromJSON Protocol where
<> show str <> " is not a valid protocol"

type SomeConsensusProtocolConstraints blk =
( HasKESMetricsData blk
, RunNode blk
( RunNode blk
, TraceConstraints blk
)

Expand Down
9 changes: 5 additions & 4 deletions cardano-node/src/Cardano/Tracing/Constraints.hs
Expand Up @@ -10,15 +10,15 @@ import Data.Aeson
import Cardano.BM.Tracing (ToObject)
import Cardano.Tracing.ConvertTxId (ConvertTxId)
import Cardano.Tracing.HasIssuer (HasIssuer)
import Cardano.Tracing.Metrics (HasKESMetricsData)
import Cardano.Tracing.Queries (LedgerQueries)

import Ouroboros.Consensus.Block (BlockProtocol, CannotForge,
ForgeStateUpdateError, Header)
import Ouroboros.Consensus.Block (BlockProtocol, CannotForge, ForgeStateUpdateError,
Header)
import Ouroboros.Consensus.HeaderValidation (OtherHeaderEnvelopeError)
import Ouroboros.Consensus.Ledger.Abstract (LedgerError)
import Ouroboros.Consensus.Ledger.Inspect (LedgerEvent)
import Ouroboros.Consensus.Ledger.SupportsMempool (ApplyTxErr, HasTxId,
HasTxs (..))
import Ouroboros.Consensus.Ledger.SupportsMempool (ApplyTxErr, HasTxId, HasTxs (..))
import Ouroboros.Consensus.Protocol.Abstract (ValidationErr)
import Ouroboros.Consensus.Shelley.Ledger.Mempool (GenTx, TxId)

Expand All @@ -27,6 +27,7 @@ import Ouroboros.Consensus.Shelley.Ledger.Mempool (GenTx, TxId)
type TraceConstraints blk =
( ConvertTxId blk
, HasIssuer blk
, HasKESMetricsData blk
, HasTxs blk
, HasTxId (GenTx blk)
, LedgerQueries blk
Expand Down
1 change: 0 additions & 1 deletion cardano-node/src/Cardano/Tracing/Tracers.hs
Expand Up @@ -272,7 +272,6 @@ initialBlockchainCounters = BlockchainCounters 0 0 0 0 0
mkTracers
:: forall peer localPeer blk.
( Consensus.RunNode blk
, HasKESMetricsData blk
, TraceConstraints blk
, Show peer, Eq peer
, Show localPeer
Expand Down

0 comments on commit 2614d8c

Please sign in to comment.