From dee1d59dc6f3943947cd3e2f5bb4d8a6501b3ec2 Mon Sep 17 00:00:00 2001 From: Sasha Bogicevic Date: Fri, 12 Apr 2024 10:15:48 +0200 Subject: [PATCH] Make sure blueprint inputs are present in the commit tx also --- hydra-node/test/Hydra/Chain/Direct/TxSpec.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hydra-node/test/Hydra/Chain/Direct/TxSpec.hs b/hydra-node/test/Hydra/Chain/Direct/TxSpec.hs index eef69793a8a..ef8b7b99f9d 100644 --- a/hydra-node/test/Hydra/Chain/Direct/TxSpec.hs +++ b/hydra-node/test/Hydra/Chain/Direct/TxSpec.hs @@ -16,6 +16,7 @@ import Cardano.Ledger.Api (auxDataTxL, bodyTxL, inputsTxBodyL, isValidTxL, outpu import Cardano.Ledger.Core (EraTx (getMinFeeTx)) import Control.Lens ((^.)) import Data.Map qualified as Map +import Data.Set qualified as Set import Data.Text qualified as T import Hydra.Cardano.Api.Pretty (renderTx, renderTxWithUTxO) import Hydra.Chain (HeadParameters (..)) @@ -193,7 +194,7 @@ spec = , transactionEvaluates (signedCommitTx, commitUTxO) , blueprintTx ^. isValidTxL === tx ^. isValidTxL , (blueprintTx ^. auxDataTxL) =/= (tx ^. auxDataTxL) - , property (length (blueprintBody ^. inputsTxBodyL) <= length (commitTxBody ^. inputsTxBodyL)) + , property $ (blueprintBody ^. inputsTxBodyL) `Set.isSubsetOf` (commitTxBody ^. inputsTxBodyL) , property (length (blueprintBody ^. outputsTxBodyL) <= length (commitTxBody ^. outputsTxBodyL)) , property (length (blueprintBody ^. referenceInputsTxBodyL) <= length (commitTxBody ^. referenceInputsTxBodyL)) , property (length (blueprintBody ^. reqSignerHashesTxBodyL) <= length (commitTxBody ^. reqSignerHashesTxBodyL))