Skip to content

Commit

Permalink
Remove unused Gen TxIn argument from generateWithMinimalUTxO.
Browse files Browse the repository at this point in the history
In response to review feedback:

#4570 (comment)
  • Loading branch information
jonathanknowles committed May 11, 2024
1 parent 9e5d396 commit 71610da
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ generate
-> Gen (TxWithUTxO era)
generate genTx genTxIn genTxOut =
frequency
[ (9, generateWithMinimalUTxO genTx genTxIn genTxOut)
[ (9, generateWithMinimalUTxO genTx genTxOut)
, (1, generateWithSurplusUTxO genTx genTxIn genTxOut)
]

Expand All @@ -77,10 +77,9 @@ generate genTx genTxIn genTxOut =
generateWithMinimalUTxO
:: IsRecentEra era
=> Gen (Tx era)
-> Gen (TxIn)
-> Gen (TxOut era)
-> Gen (TxWithUTxO era)
generateWithMinimalUTxO genTx _genTxIn genTxOut = do
generateWithMinimalUTxO genTx genTxOut = do
tx <- genTx
utxo <- UTxO <$> genMapFromKeysWith genTxOut (txAllInputs tx)
pure $ TxWithUTxO.constructFiltered tx utxo
Expand All @@ -99,7 +98,7 @@ generateWithSurplusUTxO
-> Gen (TxOut era)
-> Gen (TxWithUTxO era)
generateWithSurplusUTxO genTx genTxIn genTxOut =
generateWithMinimalUTxO genTx genTxIn genTxOut >>= \case
generateWithMinimalUTxO genTx genTxOut >>= \case
TxWithUTxO tx (UTxO utxo) -> do
utxoSurplus <- genNonEmptyDisjointMap genTxIn genTxOut utxo
pure $ TxWithUTxO.constructFiltered tx $ UTxO (utxo <> utxoSurplus)
Expand Down

0 comments on commit 71610da

Please sign in to comment.