@@ -12,7 +12,10 @@ import Cardano.Api
1212import qualified Cardano.Api.Ledger as L
1313import Cardano.Api.Shelley
1414
15+ import Cardano.CLI.Types.Common
16+ import Cardano.Crypto.Hash.Class (hashToStringAsHex )
1517import qualified Cardano.Ledger.Core as L
18+
1619import Cardano.Testnet
1720
1821import Prelude
@@ -28,7 +31,7 @@ import qualified System.Info as SYS
2831import Testnet.Components.Configuration
2932import Testnet.Components.Query (findLargestUtxoWithAddress , findUtxosWithAddress ,
3033 getEpochStateView , waitForBlocks )
31- import Testnet.Process.Run ( execCli' , mkExecConfig )
34+ import Testnet.Process.Run
3235import Testnet.Property.Util (integrationRetryWorkspace )
3336import Testnet.Types
3437
@@ -108,10 +111,11 @@ hprop_transaction = integrationRetryWorkspace 2 "simple transaction build" $ \te
108111 , " --out-file" , txbodySignedFp
109112 ]
110113
111- void $ execCli' execConfig
114+ txSubmissionResult :: TxSubmissionResult <- execCliStdoutToJson execConfig
112115 [ anyEraToString cEra, " transaction" , " submit"
113116 , " --tx-file" , txbodySignedFp
114117 ]
118+ let TxId txHash = txhash txSubmissionResult
115119
116120 H. noteShowM_ $ waitForBlocks epochStateView 1
117121
@@ -121,6 +125,12 @@ hprop_transaction = integrationRetryWorkspace 2 "simple transaction build" $ \te
121125 H. assertWith txouts2 $ \ txouts2' ->
122126 [transferAmount, initialAmount - transferAmount - txFee] == txouts2'
123127
128+ -- Check that the transaction output exists, when querying by id:
129+ void $ execCli' execConfig
130+ [ anyEraToString cEra, " query" , " utxo"
131+ , " --tx-in" , hashToStringAsHex txHash <> " #0"
132+ ]
133+
124134txOutValue :: TxOut ctx era -> TxOutValue era
125135txOutValue (TxOut _ v _ _) = v
126136
0 commit comments