Skip to content

Commit

Permalink
Remove MutateHeadScriptInput since it is not relevant anymore for v_c…
Browse files Browse the repository at this point in the history
…ommit
  • Loading branch information
v0d1ch authored and ch1bo committed Jan 11, 2023
1 parent d1b9fc0 commit 6ff7ab4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
6 changes: 1 addition & 5 deletions hydra-node/test/Hydra/Chain/Direct/Contract/Abort.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ import Hydra.Chain.Direct.Contract.Mutation (
Mutation (..),
SomeMutation (..),
addPTWithQuantity,
anyPayToPubKeyTxOut,
changeMintedValueQuantityFrom,
headTxIn,
replacePolicyIdWith,
)
import Hydra.Chain.Direct.Fixture (genForParty, testNetworkId, testPolicyId, testSeedInput)
Expand Down Expand Up @@ -129,7 +127,6 @@ propHasCommit (_, utxo) =
data AbortMutation
= MutateParties
| DropOneCommitOutput
| MutateHeadScriptInput
| BurnOneTokenMore
| -- | Meant to test that the minting policy is burning all PTs present in tx
MutateThreadTokenQuantity
Expand All @@ -143,7 +140,7 @@ data AbortMutation
deriving (Generic, Show, Enum, Bounded)

genAbortMutation :: (Tx, UTxO) -> Gen SomeMutation
genAbortMutation (tx, utxo) =
genAbortMutation (tx, _utxo) =
oneof
[ SomeMutation MutateParties . ChangeHeadDatum <$> do
moreParties <- (: healthyParties) <$> arbitrary
Expand All @@ -152,7 +149,6 @@ genAbortMutation (tx, utxo) =
, SomeMutation DropOneCommitOutput
. RemoveOutput
<$> choose (0, fromIntegral (length (txOuts' tx) - 1))
, SomeMutation MutateHeadScriptInput <$> (ChangeInput (headTxIn utxo) <$> anyPayToPubKeyTxOut <*> pure Nothing)
, SomeMutation MutateThreadTokenQuantity <$> changeMintedValueQuantityFrom tx (-1)
, SomeMutation BurnOneTokenMore <$> addPTWithQuantity tx (-1)
, SomeMutation DropCollectedInput . RemoveInput <$> elements (txIns' tx)
Expand Down
7 changes: 1 addition & 6 deletions hydra-node/test/Hydra/Chain/Direct/Contract/CollectCom.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ import Data.Maybe (fromJust)
import Hydra.Chain.Direct.Contract.Mutation (
Mutation (..),
SomeMutation (..),
anyPayToPubKeyTxOut,
changeHeadOutputDatum,
genHash,
headTxIn,
)
import Hydra.Chain.Direct.Fixture (
genForParty,
Expand Down Expand Up @@ -156,7 +154,6 @@ healthyCommitOutput party committed =

data CollectComMutation
= MutateOpenUTxOHash
| MutateHeadScriptInput
| MutateHeadTransition
| -- | NOTE: We want to ccheck CollectCom validator checks there's exactly the
-- expected number of commits. This is needed because the Head protocol
Expand All @@ -167,11 +164,9 @@ data CollectComMutation
deriving (Generic, Show, Enum, Bounded)

genCollectComMutation :: (Tx, UTxO) -> Gen SomeMutation
genCollectComMutation (tx, utxo) =
genCollectComMutation (tx, _utxo) =
oneof
[ SomeMutation MutateOpenUTxOHash . ChangeOutput 0 <$> mutateUTxOHash
, SomeMutation MutateHeadScriptInput
<$> (ChangeInput (headTxIn utxo) <$> anyPayToPubKeyTxOut <*> pure Nothing)
, SomeMutation MutateHeadTransition <$> do
changeRedeemer <- ChangeHeadRedeemer <$> (Head.Close 0 . toBuiltin <$> genHash <*> arbitrary)
differencCurrencySymbol <- arbitrary `suchThat` (/= toPlutusCurrencySymbol testPolicyId)
Expand Down
2 changes: 0 additions & 2 deletions hydra-node/test/Hydra/Chain/Direct/Contract/Mutation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
-- oneof
-- [ SomeMutation MutateOpenOutputValue . ChangeOutput ...
-- , SomeMutation MutateOpenUtxoHash . ChangeOutput ...
-- , SomeMutation MutateHeadScriptInput . ChangeInput ...
-- , SomeMutation MutateHeadTransition <$> do
-- changeRedeemer <- ChangeHeadRedeemer <$> ...
-- changeDatum <- ChangeHeadDatum <$> ...
Expand Down Expand Up @@ -121,7 +120,6 @@
-- 30.5% MutateOpenUtxoHash
-- 27.0% MutateHeadTransition
-- 23.5% MutateOpenOutputValue
-- 19.0% MutateHeadScriptInput
--
-- Finished in 18.1146 seconds
-- @
Expand Down

0 comments on commit 6ff7ab4

Please sign in to comment.