Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- mkSomeConsensusProtocolCole ∷ NodeColeProtocolConfiguration → Maybe ProtocolFilepaths → ExceptT ColeProtocolInstantiationError IO SomeConsensusProtocol
- data ColeProtocolInstantiationError
- = CanonicalDecodeFailure !FilePath !Text
- | GenesisHashMismatch !GenesisHash !GenesisHash
- | DelegationCertificateFilepathNotSpecified
- | GenesisConfigurationError !FilePath !ConfigurationError
- | GenesisReadError !FilePath !GenesisDataError
- | CredentialsError !ColeLeaderCredentialsError
- | SigningKeyDeserialiseFailure !FilePath
- | SigningKeyFilepathNotSpecified
- readGenesis ∷ GenesisFile → Maybe GenesisHash → RequiresNetworkMagic → ExceptT ColeProtocolInstantiationError IO Config
- readLeaderCredentials ∷ Config → Maybe ProtocolFilepaths → ExceptT ColeProtocolInstantiationError IO (Maybe ColeLeaderCredentials)
Documentation
mkSomeConsensusProtocolCole ∷ NodeColeProtocolConfiguration → Maybe ProtocolFilepaths → ExceptT ColeProtocolInstantiationError IO SomeConsensusProtocol Source #
Make SomeConsensusProtocol
using the Cole instance.
This lets us handle multiple protocols in a generic way.
This also serves a purpose as a sanity check that we have all the necessary type class instances available.
Errors
data ColeProtocolInstantiationError Source #
CanonicalDecodeFailure !FilePath !Text | |
GenesisHashMismatch !GenesisHash !GenesisHash | |
DelegationCertificateFilepathNotSpecified | |
GenesisConfigurationError !FilePath !ConfigurationError | |
GenesisReadError !FilePath !GenesisDataError | |
CredentialsError !ColeLeaderCredentialsError | |
SigningKeyDeserialiseFailure !FilePath | |
SigningKeyFilepathNotSpecified |
Instances
Reusable parts
readGenesis ∷ GenesisFile → Maybe GenesisHash → RequiresNetworkMagic → ExceptT ColeProtocolInstantiationError IO Config Source #
readLeaderCredentials ∷ Config → Maybe ProtocolFilepaths → ExceptT ColeProtocolInstantiationError IO (Maybe ColeLeaderCredentials) Source #