Skip to content

Commit

Permalink
Make genTxIn a top-level function.
Browse files Browse the repository at this point in the history
The new location is next to the other general-purpose generators, such
as `genTxOut`.
  • Loading branch information
jonathanknowles committed May 11, 2024
1 parent 71610da commit 0433f6b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2219,9 +2219,6 @@ txWithUTxOFromPartialTx PartialTx {tx, extraUTxO} =

genTxWithUTxO :: IsRecentEra era => Gen (TxWithUTxO era)
genTxWithUTxO = TxWithUTxO.generate genTxForBalancing genTxIn genTxOut
where
genTxIn :: Gen TxIn
genTxIn = fromWalletTxIn <$> W.genTxIn

shrinkTxWithUTxO :: IsRecentEra era => TxWithUTxO era -> [TxWithUTxO era]
shrinkTxWithUTxO = TxWithUTxO.shrinkWith shrinkTx shrinkUTxOToSubsets
Expand Down Expand Up @@ -2324,6 +2321,9 @@ genTxForBalancing :: forall era. IsRecentEra era => Gen (Tx era)
genTxForBalancing =
fromCardanoApiTx <$> CardanoApi.genTxForBalancing (cardanoEra @era)

genTxIn :: Gen TxIn
genTxIn = fromWalletTxIn <$> W.genTxIn

genTxOut :: forall era. IsRecentEra era => Gen (TxOut era)
genTxOut =
-- NOTE: genTxOut does not generate quantities larger than
Expand Down

0 comments on commit 0433f6b

Please sign in to comment.