File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
hydra-node/test/Hydra/Chain/Direct Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -160,11 +160,12 @@ prop_traces =
160
160
_ -> False
161
161
162
162
hasDecrement =
163
- any $
163
+ all $
164
164
\ (_ := ActionWithPolarity {polarAction, polarity}) -> case polarAction of
165
- Decrement {snapshot} -> polarity == PosPolarity && sum (Map. elems (decommitUTxO snapshot)) > 0
165
+ Decrement {snapshot} -> polarity == PosPolarity && sum (Map. elems (decommitUTxO snapshot)) < initialAmount
166
166
_ -> False
167
167
168
+
168
169
prop_runActions :: Actions Model -> Property
169
170
prop_runActions actions =
170
171
monadic runAppMProperty $ do
@@ -238,6 +239,9 @@ data TxResult = TxResult
238
239
}
239
240
deriving (Eq , Show )
240
241
242
+ initialAmount :: Natural
243
+ initialAmount = 10
244
+
241
245
instance StateModel Model where
242
246
data Action Model a where
243
247
Decrement :: {actor :: Actor , snapshot :: ModelSnapshot } -> Action Model TxResult
@@ -253,7 +257,7 @@ instance StateModel Model where
253
257
{ headState = Open
254
258
, latestSnapshot = 0
255
259
, alreadyContested = []
256
- , utxoInHead = fromList [(A , 0 )]
260
+ , utxoInHead = fromList [(A , initialAmount )]
257
261
}
258
262
259
263
arbitraryAction :: VarContext -> Model -> Gen (Any (Action Model ))
You can’t perform that action at this time.
0 commit comments