tests
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Chain.Direct.StateSpec

Synopsis

Documentation

spec :: Spec Source #

genInitTxMutation :: TxIn -> Tx -> Gen (Mutation, String, NotAnInitReason) Source #

genCommitTxMutation :: UTxO -> Tx -> Gen Mutation Source #

Properties

prop_observeAnyTx :: Property Source #

Given any Head protocol state and the transaction corresponding a protocol transition we should be able to observe this transition correctly even in presence of other valid Hydra Head protocol states in the used lookup utxo.

propBelowSizeLimit :: Natural -> ((UTxO -> Tx -> Property) -> Property) -> SpecWith () Source #

propIsValid :: ((UTxO -> Tx -> Property) -> Property) -> SpecWith () Source #

Generators

forAllInit :: Testable property => (UTxO -> Tx -> property) -> Property Source #

forAllCommit :: Testable property => (UTxO -> Tx -> property) -> Property Source #

forAllCommit' :: Testable property => (ChainContext -> InitialState -> UTxO -> Tx -> property) -> Property Source #

forAllAbort :: Testable property => (UTxO -> Tx -> property) -> Property Source #

forAllCollectCom :: Testable property => (UTxO -> Tx -> property) -> Property Source #

forAllClose :: Testable property => (UTxO -> Tx -> property) -> Property Source #

forAllContest :: Testable property => (UTxO -> Tx -> property) -> Property Source #

forAllFanout :: Testable property => (UTxO -> Tx -> property) -> Property Source #

genInitTxWithSeed :: HydraContext -> Gen (Tx, TxIn) Source #

Generate an init tx with the used seed TxIn.

Helpers

mfail :: MonadFail m => Maybe a -> m a Source #