From 0433f6b918ccad77983f26d087705047ff164576 Mon Sep 17 00:00:00 2001 From: Jonathan Knowles Date: Sat, 11 May 2024 02:40:53 +0000 Subject: [PATCH] Make `genTxIn` a top-level function. The new location is next to the other general-purpose generators, such as `genTxOut`. --- .../test/spec/Internal/Cardano/Write/Tx/BalanceSpec.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/balance-tx/test/spec/Internal/Cardano/Write/Tx/BalanceSpec.hs b/lib/balance-tx/test/spec/Internal/Cardano/Write/Tx/BalanceSpec.hs index 1bc37b83108..61ced9e0370 100644 --- a/lib/balance-tx/test/spec/Internal/Cardano/Write/Tx/BalanceSpec.hs +++ b/lib/balance-tx/test/spec/Internal/Cardano/Write/Tx/BalanceSpec.hs @@ -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 @@ -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