Skip to content
Permalink
Browse files

Changes for compatibility with cardano-node

  • Loading branch information...
nc6 committed Jul 10, 2019
1 parent 235bf7d commit d180437df797e79dfb6981dfa681fcca6f85981b
@@ -17,6 +17,8 @@ import Data.Coerce
import Data.Maybe (fromJust)
import qualified Data.Sequence as Seq

import Formatting (formatToString)

import qualified Cardano.Chain.Block as Cardano.Block
import qualified Cardano.Chain.Genesis as Cardano.Genesis
import qualified Cardano.Chain.Update as Cardano.Update
@@ -30,6 +32,7 @@ import Ouroboros.Consensus.Ledger.Extended
import Ouroboros.Consensus.NodeId (CoreNodeId (..), NodeId (..))
import Ouroboros.Consensus.Protocol.ExtNodeConfig
import Ouroboros.Consensus.Protocol.PBFT
import Ouroboros.Consensus.Util.Condense

import Ouroboros.Consensus.Demo.Ledger.Byron.Config
import Ouroboros.Consensus.Demo.Ledger.Byron.Elaborate
@@ -107,6 +110,9 @@ protocolInfoByron (NumCoreNodes numCoreNodes) (CoreNodeId nid) params gc =
RunDemo instance
-------------------------------------------------------------------------------}

instance Condense Cardano.Block.HeaderHash where
condense = formatToString Cardano.Block.headerHashF

instance DemoHeaderHash Cardano.Block.HeaderHash where
demoEncodeHeaderHash = encodeByronHeaderHash
demoDecodeHeaderHash = decodeByronHeaderHash
@@ -61,6 +61,7 @@ class ( ProtocolLedgerView blk
, DemoHeaderHash (HeaderHash blk)
, Condense (Header blk)
, Condense (ChainHash blk)
, Condense (HeaderHash blk)
, Condense blk
, Condense [blk]
, Show blk

0 comments on commit d180437

Please sign in to comment.
You can’t perform that action at this time.