Skip to content

Commit

Permalink
Make sure blueprint inputs are present in the commit tx also
Browse files Browse the repository at this point in the history
  • Loading branch information
v0d1ch authored and Sasha Bogicevic committed Apr 17, 2024
1 parent 69c57a9 commit dee1d59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hydra-node/test/Hydra/Chain/Direct/TxSpec.hs
Expand Up @@ -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 (..))
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit dee1d59

Please sign in to comment.