@@ -94,7 +94,6 @@ import Test.Cardano.Ledger.Shelley.Arbitrary (genMetadata')
94
94
import Test.Hydra.Fixture (genForParty )
95
95
import Test.Hydra.Prelude
96
96
import Test.QuickCheck (
97
- Positive (.. ),
98
97
Property ,
99
98
checkCoverage ,
100
99
choose ,
@@ -290,11 +289,10 @@ genBlueprintTxWithUTxO =
290
289
>>= addSomeReferenceInputs
291
290
>>= addValidityRange
292
291
>>= addRandomMetadata
293
- >>= removeRandomInputs
294
292
>>= addCollateralInput
295
293
where
296
294
spendingPubKeyOutput (utxo, txbody) = do
297
- utxoToSpend <- ( genUTxOAdaOnlyOfSize . getPositive) . Positive =<< choose (0 , 50 )
295
+ utxoToSpend <- genUTxOAdaOnlyOfSize =<< choose (0 , 3 )
298
296
pure
299
297
( utxo <> utxoToSpend
300
298
, txbody & addVkInputs (toList $ UTxO. inputSet utxoToSpend)
@@ -303,8 +301,7 @@ genBlueprintTxWithUTxO =
303
301
spendSomeScriptInputs (utxo, txbody) = do
304
302
let alwaysSucceedingScript = PlutusScriptSerialised $ Plutus. alwaysSucceedingNAryFunction 3
305
303
datum <- unsafeHashableScriptData . fromPlutusData <$> arbitrary
306
- redeemer <-
307
- unsafeHashableScriptData . fromPlutusData <$> arbitrary -- . B . BS.pack <$> vector n
304
+ redeemer <- unsafeHashableScriptData . fromPlutusData <$> arbitrary
308
305
let genTxOut = do
309
306
value <- genValue
310
307
let scriptAddress = mkScriptAddress testNetworkId alwaysSucceedingScript
@@ -340,10 +337,6 @@ genBlueprintTxWithUTxO =
340
337
mtdt <- genMetadata
341
338
pure (utxo, txbody{txMetadata = mtdt})
342
339
343
- removeRandomInputs (utxo, txbody) = do
344
- someInput <- elements $ txIns txbody
345
- pure (utxo, txbody{txIns = [someInput]})
346
-
347
340
addCollateralInput (utxo, txbody) = do
348
341
utxoToSpend <- genUTxOAdaOnlyOfSize 1
349
342
pure
@@ -369,6 +362,7 @@ prop_interestingBlueprintTx = do
369
362
True
370
363
& cover 1 (spendsFromScript (utxo, tx)) " blueprint spends script UTxO"
371
364
& cover 1 (spendsFromPubKey (utxo, tx)) " blueprint spends pub key UTxO"
365
+ & cover 1 (spendsFromPubKey (utxo, tx) && spendsFromScript (utxo, tx)) " blueprint spends from script AND pub key"
372
366
& cover 1 (hasReferenceInputs tx) " blueprint has reference input"
373
367
where
374
368
hasReferenceInputs tx =
0 commit comments