diff --git a/hydra-node/src/Hydra/Chain/Direct/State.hs b/hydra-node/src/Hydra/Chain/Direct/State.hs index 2b64e52a8f6..e15092d86d4 100644 --- a/hydra-node/src/Hydra/Chain/Direct/State.hs +++ b/hydra-node/src/Hydra/Chain/Direct/State.hs @@ -368,9 +368,7 @@ commit' :: commit' ctx headId spendableUTxO utxoToCommit blueprintTx = do pid <- headIdToPolicyId headId ?> InvalidHeadId{headId} (i, o) <- ownInitial pid ?> CannotFindOwnInitial{knownUTxO = spendableUTxO} - -- FIXME: not all outputs in utxoToCommit are necessarily commited, they could also be reference inputs to the blueprintTx rejectByronAddress utxoToCommit - rejectReferenceScripts utxoToCommit rejectMoreThanMainnetLimit networkId utxoToCommit pure $ commitTx networkId scriptRegistry headId ownParty utxoToCommit blueprintTx (i, o, vkh) where @@ -392,16 +390,6 @@ rejectByronAddress u = do (TxOut ShelleyAddressInEra{} _ _ _) -> Right () -rejectReferenceScripts :: UTxO -> Either (PostTxError Tx) () -rejectReferenceScripts u = - when (any hasReferenceScript u) $ - Left CannotCommitReferenceScript - where - hasReferenceScript out = - case txOutReferenceScript out of - ReferenceScript{} -> True - ReferenceScriptNone -> False - -- Rejects outputs with more than 'maxMainnetLovelace' lovelace on mainnet -- NOTE: Remove this limit once we have more experiments on mainnet. rejectMoreThanMainnetLimit :: NetworkId -> UTxO -> Either (PostTxError Tx) () diff --git a/hydra-node/test/Hydra/Chain/Direct/StateSpec.hs b/hydra-node/test/Hydra/Chain/Direct/StateSpec.hs index fe9025cfaa3..376020d6398 100644 --- a/hydra-node/test/Hydra/Chain/Direct/StateSpec.hs +++ b/hydra-node/test/Hydra/Chain/Direct/StateSpec.hs @@ -274,16 +274,6 @@ spec = parallel $ do Left UnsupportedLegacyOutput{} -> property True _ -> property False - prop "reject committing outputs with reference scripts" $ - monadicST $ do - hctx <- pickBlind $ genHydraContext maximumNumberOfParties - (ctx, stInitial@InitialState{headId}) <- pickBlind $ genStInitial hctx - utxo <- pick $ genUTxO1 genTxOutWithReferenceScript - pure $ - case commit ctx headId (getKnownUTxO stInitial) utxo of - Left CannotCommitReferenceScript{} -> property True - _ -> property False - prop "reject Commits with more than maxMainnetLovelace Lovelace" $ monadicST $ do hctx <- pickBlind $ genHydraContext maximumNumberOfParties