Skip to content

Commit

Permalink
genByron stash
Browse files Browse the repository at this point in the history
  • Loading branch information
locallycompact committed Dec 7, 2024
1 parent e1345e0 commit d2dfd1b
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 74 deletions.
4 changes: 2 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ repository cardano-haskell-packages

-- See CONTRIBUTING.md for information about when and how to update these.
index-state:
, hackage.haskell.org 2024-11-12T16:26:18Z
, cardano-haskell-packages 2024-11-12T08:40:13Z
, hackage.haskell.org 2024-11-22T14:59:16Z
, cardano-haskell-packages 2024-12-05T13:51:16Z

packages:
hydra-prelude
Expand Down
124 changes: 62 additions & 62 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions hydra-node/test/Hydra/Chain/Direct/StateSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ import Hydra.Tx.Utils (dummyValidatorScript, splitUTxO)
import PlutusLedgerApi.V3 qualified as Plutus
import Test.Aeson.GenericSpecs (roundtripAndGoldenSpecs)
import Test.Hydra.Tx.Fixture (slotLength, systemStart, testNetworkId)
import Test.Hydra.Tx.Gen (genOutput, genTxOut, genTxOutAdaOnly, genTxOutByron, genUTxO1, genUTxOSized)
import Test.Gen.Cardano.Api.Typed (genTxOutByron)
import Test.Hydra.Tx.Gen (genOutput, genTxOut, genTxOutAdaOnly, genUTxO1, genUTxOSized)
import Test.Hydra.Tx.Mutation (
Mutation (..),
applyMutation,
Expand Down Expand Up @@ -273,7 +274,7 @@ spec = parallel $ do
monadicST $ do
hctx <- pickBlind $ genHydraContext maximumNumberOfParties
(ctx, stInitial@InitialState{headId}) <- pickBlind $ genStInitial hctx
utxo <- pick $ genUTxO1 genTxOutByron
utxo <- pick $ genUTxO1 (hedgehog genTxOutByron)
pure $
case commit ctx headId (getKnownUTxO stInitial) utxo of
Left UnsupportedLegacyOutput{} -> property True
Expand Down
8 changes: 0 additions & 8 deletions hydra-tx/testlib/Test/Hydra/Tx/Gen.hs
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,6 @@ genTxOut =
noRefScripts out =
out{txOutReferenceScript = ReferenceScriptNone}

-- | Generate a 'TxOut' with a byron address. This is usually not supported by
-- Hydra or Plutus.
genTxOutByron :: Gen (TxOut ctx)
genTxOutByron = do
addr <- ByronAddressInEra <$> arbitrary
value <- genValue
pure $ TxOut addr value TxOutDatumNone ReferenceScriptNone

-- | Generate an ada-only 'TxOut' payed to an arbitrary public key.
genTxOutAdaOnly :: VerificationKey PaymentKey -> Gen (TxOut ctx)
genTxOutAdaOnly vk = do
Expand Down

0 comments on commit d2dfd1b

Please sign in to comment.