File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
hydra-tx/test/Hydra/Tx/Contract Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import Hydra.Tx.Deposit (depositTx)
15
15
import Test.Hydra.Tx.Fixture (slotLength , systemStart , testNetworkId , testPolicyId )
16
16
import Test.Hydra.Tx.Gen (genUTxOSized )
17
17
import Test.Hydra.Tx.Mutation (Mutation (.. ), SomeMutation (.. ))
18
- import Test.QuickCheck (chooseInteger , elements )
18
+ import Test.QuickCheck (chooseEnum , chooseInteger , elements )
19
19
20
20
genHealthyDepositTx :: Gen (Tx , UTxO )
21
21
genHealthyDepositTx = do
@@ -28,12 +28,17 @@ genHealthyDepositTx = do
28
28
testNetworkId
29
29
(mkHeadId testPolicyId)
30
30
(mkSimpleBlueprintTx toDeposit)
31
- ( SlotNo 1 ) -- TODO: generate?
32
- healthyDeadline -- TODO: generate?
31
+ slot
32
+ healthyDeadline
33
33
pure (tx, toDeposit)
34
+ where
35
+ slot = chooseEnum (0 , healthyDeadlineSlot) `generateWith` 42
34
36
35
37
healthyDeadline :: UTCTime
36
- healthyDeadline = slotNoToUTCTime systemStart slotLength $ SlotNo 10
38
+ healthyDeadline = slotNoToUTCTime systemStart slotLength healthyDeadlineSlot
39
+
40
+ healthyDeadlineSlot :: SlotNo
41
+ healthyDeadlineSlot = arbitrary `generateWith` 42
37
42
38
43
data DepositMutation
39
44
= -- | Change the output value to a subset of the deposited value. This
You can’t perform that action at this time.
0 commit comments