hydra-node-0.20.0: The Hydra node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.HeadLogic.Error

Description

Error types used in the Hydra.HeadLogic module.

Documentation

data LogicError tx Source #

Instances

Instances details
(Arbitrary (Input tx), Arbitrary (HeadState tx), Arbitrary (RequirementFailure tx)) => Arbitrary (LogicError tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Error

Methods

arbitrary :: Gen (LogicError tx)

shrink :: LogicError tx -> [LogicError tx]

(FromJSON (HeadState tx), FromJSON (Input tx), FromJSON (RequirementFailure tx)) => FromJSON (LogicError tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Error

Methods

parseJSON :: Value -> Parser (LogicError tx)

parseJSONList :: Value -> Parser [LogicError tx]

omittedField :: Maybe (LogicError tx)

(ToJSON (HeadState tx), ToJSON (Input tx), ToJSON (RequirementFailure tx)) => ToJSON (LogicError tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Error

Methods

toJSON :: LogicError tx -> Value

toEncoding :: LogicError tx -> Encoding

toJSONList :: [LogicError tx] -> Value

toEncodingList :: [LogicError tx] -> Encoding

omitField :: LogicError tx -> Bool

(Typeable tx, Show (Input tx), Show (HeadState tx), Show (RequirementFailure tx)) => Exception (LogicError tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Error

Generic (LogicError tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Error

Associated Types

type Rep (LogicError tx) :: Type -> Type Source #

Methods

from :: LogicError tx -> Rep (LogicError tx) x Source #

to :: Rep (LogicError tx) x -> LogicError tx Source #

(Show (HeadState tx), Show (Input tx), Show (RequirementFailure tx)) => Show (LogicError tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Error

(Eq (HeadState tx), Eq (Input tx), Eq (RequirementFailure tx)) => Eq (LogicError tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Error

Methods

(==) :: LogicError tx -> LogicError tx -> Bool Source #

(/=) :: LogicError tx -> LogicError tx -> Bool Source #

type Rep (LogicError tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Error

type Rep (LogicError tx) = D1 ('MetaData "LogicError" "Hydra.HeadLogic.Error" "hydra-node-0.20.0-5pXAEiXeWsXH8K4KfwlMxW" 'False) ((C1 ('MetaCons "UnhandledInput" 'PrefixI 'True) (S1 ('MetaSel ('Just "input") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Input tx)) :*: S1 ('MetaSel ('Just "currentHeadState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HeadState tx))) :+: C1 ('MetaCons "RequireFailed" 'PrefixI 'True) (S1 ('MetaSel ('Just "requirementFailure") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RequirementFailure tx)))) :+: (C1 ('MetaCons "AssertionFailed" 'PrefixI 'True) (S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "NotOurHead" 'PrefixI 'True) (S1 ('MetaSel ('Just "ourHeadId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HeadId) :*: S1 ('MetaSel ('Just "otherHeadId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HeadId))))

data RequirementFailure tx Source #

Constructors

ReqSnNumberInvalid 

Fields

ReqSvNumberInvalid 

Fields

ReqSnNotLeader 

Fields

ReqSnDecommitNotSettled 
ReqSnCommitNotSettled 
InvalidMultisignature 

Fields

SnapshotAlreadySigned 

Fields

AckSnNumberInvalid 

Fields

SnapshotDoesNotApply 

Fields

RecoverNotMatchingDeposit 

Instances

Instances details
Arbitrary (TxIdType tx) => Arbitrary (RequirementFailure tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Error

FromJSON (TxIdType tx) => FromJSON (RequirementFailure tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Error

Methods

parseJSON :: Value -> Parser (RequirementFailure tx)

parseJSONList :: Value -> Parser [RequirementFailure tx]

omittedField :: Maybe (RequirementFailure tx)

ToJSON (TxIdType tx) => ToJSON (RequirementFailure tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Error

Generic (RequirementFailure tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Error

Associated Types

type Rep (RequirementFailure tx) :: Type -> Type Source #

Show (TxIdType tx) => Show (RequirementFailure tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Error

Eq (TxIdType tx) => Eq (RequirementFailure tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Error

type Rep (RequirementFailure tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Error

type Rep (RequirementFailure tx) = D1 ('MetaData "RequirementFailure" "Hydra.HeadLogic.Error" "hydra-node-0.20.0-5pXAEiXeWsXH8K4KfwlMxW" 'False) (((C1 ('MetaCons "ReqSnNumberInvalid" 'PrefixI 'True) (S1 ('MetaSel ('Just "requestedSn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapshotNumber) :*: S1 ('MetaSel ('Just "lastSeenSn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapshotNumber)) :+: C1 ('MetaCons "ReqSvNumberInvalid" 'PrefixI 'True) (S1 ('MetaSel ('Just "requestedSv") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapshotVersion) :*: S1 ('MetaSel ('Just "lastSeenSv") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapshotVersion))) :+: (C1 ('MetaCons "ReqSnNotLeader" 'PrefixI 'True) (S1 ('MetaSel ('Just "requestedSn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapshotNumber) :*: S1 ('MetaSel ('Just "leader") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Party)) :+: (C1 ('MetaCons "ReqSnDecommitNotSettled" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ReqSnCommitNotSettled" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "InvalidMultisignature" 'PrefixI 'True) (S1 ('MetaSel ('Just "multisig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "vkeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [VerificationKey HydraKey])) :+: C1 ('MetaCons "SnapshotAlreadySigned" 'PrefixI 'True) (S1 ('MetaSel ('Just "knownSignatures") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Party]) :*: S1 ('MetaSel ('Just "receivedSignature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Party))) :+: (C1 ('MetaCons "AckSnNumberInvalid" 'PrefixI 'True) (S1 ('MetaSel ('Just "requestedSn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapshotNumber) :*: S1 ('MetaSel ('Just "lastSeenSn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapshotNumber)) :+: (C1 ('MetaCons "SnapshotDoesNotApply" 'PrefixI 'True) (S1 ('MetaSel ('Just "requestedSn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapshotNumber) :*: (S1 ('MetaSel ('Just "txid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TxIdType tx)) :*: S1 ('MetaSel ('Just "error") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ValidationError))) :+: C1 ('MetaCons "RecoverNotMatchingDeposit" 'PrefixI 'False) (U1 :: Type -> Type)))))