Skip to content

Commit

Permalink
Check if validity range is preserved from blueprint into the commit tx
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 dee1d59 commit a4adab1
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 @@ -12,7 +12,7 @@ import Hydra.Prelude hiding (label)
import Test.Hydra.Prelude

import Cardano.Api.UTxO qualified as UTxO
import Cardano.Ledger.Api (auxDataTxL, bodyTxL, inputsTxBodyL, isValidTxL, outputsTxBodyL, referenceInputsTxBodyL, reqSignerHashesTxBodyL)
import Cardano.Ledger.Api (auxDataTxL, bodyTxL, inputsTxBodyL, isValidTxL, outputsTxBodyL, referenceInputsTxBodyL, reqSignerHashesTxBodyL, vldtTxBodyL)
import Cardano.Ledger.Core (EraTx (getMinFeeTx))
import Control.Lens ((^.))
import Data.Map qualified as Map
Expand Down Expand Up @@ -194,6 +194,7 @@ spec =
, transactionEvaluates (signedCommitTx, commitUTxO)
, blueprintTx ^. isValidTxL === tx ^. isValidTxL
, (blueprintTx ^. auxDataTxL) =/= (tx ^. auxDataTxL)
, (blueprintBody ^. vldtTxBodyL) === (commitTxBody ^. vldtTxBodyL)
, property $ (blueprintBody ^. inputsTxBodyL) `Set.isSubsetOf` (commitTxBody ^. inputsTxBodyL)
, property (length (blueprintBody ^. outputsTxBodyL) <= length (commitTxBody ^. outputsTxBodyL))
, property (length (blueprintBody ^. referenceInputsTxBodyL) <= length (commitTxBody ^. referenceInputsTxBodyL))
Expand Down

0 comments on commit a4adab1

Please sign in to comment.