{-# LANGUAGE EmptyDataDeriving #-}
module Cardano.Node.Protocol.Conway (
ConwayProtocolInstantiationError
, readGenesis
, validateGenesis
) where
import qualified Cardano.Ledger.Conway.Genesis as Conway
import qualified Cardano.Ledger.Crypto as Crypto
import Cardano.Node.Protocol.Shelley (GenesisReadError,
readGenesisAny)
import Cardano.Node.Types
import Cardano.Prelude
readGenesis :: Crypto.Crypto c
=> GenesisFile
-> Maybe GenesisHash
-> ExceptT GenesisReadError IO
(Conway.ConwayGenesis c, GenesisHash)
readGenesis :: forall c.
Crypto c =>
GenesisFile
-> Maybe GenesisHash
-> ExceptT GenesisReadError IO (ConwayGenesis c, GenesisHash)
readGenesis = GenesisFile
-> Maybe GenesisHash
-> ExceptT GenesisReadError IO (ConwayGenesis c, GenesisHash)
forall genesis.
FromJSON genesis =>
GenesisFile
-> Maybe GenesisHash
-> ExceptT GenesisReadError IO (genesis, GenesisHash)
readGenesisAny
validateGenesis :: Conway.ConwayGenesis c
-> ExceptT ConwayProtocolInstantiationError IO ()
validateGenesis :: forall c.
ConwayGenesis c -> ExceptT ConwayProtocolInstantiationError IO ()
validateGenesis ConwayGenesis c
_ = () -> ExceptT ConwayProtocolInstantiationError IO ()
forall a. a -> ExceptT ConwayProtocolInstantiationError IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
data ConwayProtocolInstantiationError
deriving Int -> ConwayProtocolInstantiationError -> ShowS
[ConwayProtocolInstantiationError] -> ShowS
ConwayProtocolInstantiationError -> String
(Int -> ConwayProtocolInstantiationError -> ShowS)
-> (ConwayProtocolInstantiationError -> String)
-> ([ConwayProtocolInstantiationError] -> ShowS)
-> Show ConwayProtocolInstantiationError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConwayProtocolInstantiationError -> ShowS
showsPrec :: Int -> ConwayProtocolInstantiationError -> ShowS
$cshow :: ConwayProtocolInstantiationError -> String
show :: ConwayProtocolInstantiationError -> String
$cshowList :: [ConwayProtocolInstantiationError] -> ShowS
showList :: [ConwayProtocolInstantiationError] -> ShowS
Show