Skip to content

Commit 67d29a6

Browse files
committed
Fix the failing observer test
Related log book entry is here https://github.com/cardano-scaling/hydra/wiki/Logbook-2025-H1#2025-12-01 Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
1 parent 77c0617 commit 67d29a6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

hydra-cluster/test/Test/ChainObserverSpec.hs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{-# LANGUAGE DeriveAnyClass #-}
2-
-- withCreateProcess interface is annoying
32
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
43

54
-- | Integration tests for the 'hydra-chain-observer' executable. These will run
@@ -18,7 +17,7 @@ import Data.Aeson.Lens (key, _JSON, _String)
1817
import Data.ByteString (hGetLine)
1918
import Data.List qualified as List
2019
import Data.Text qualified as T
21-
import Hydra.Cardano.Api (NetworkId (..), NetworkMagic (..), lovelaceToValue, mkVkAddress, signTx, unFile, utxoFromTx)
20+
import Hydra.Cardano.Api (NetworkId (..), NetworkMagic (..), lovelaceToValue, mkVkAddress, signTx, txOutValue, unFile, utxoFromTx)
2221
import Hydra.Chain.Backend qualified as Backend
2322
import Hydra.Chain.Direct (DirectBackend (..))
2423
import Hydra.Cluster.Faucet (FaucetLog, publishHydraScriptsAs, seedFromFaucet, seedFromFaucet_)
@@ -77,11 +76,12 @@ spec = do
7776
let walletAddress = mkVkAddress networkId walletVk
7877

7978
decommitTx <-
80-
either (failure . show) pure $
81-
mkSimpleTx
82-
(List.head $ UTxO.toList commitUTxO)
83-
(walletAddress, lovelaceToValue 2_000_000)
84-
walletSk
79+
let (i, o) = List.head $ UTxO.toList commitUTxO
80+
in either (failure . show) pure $
81+
mkSimpleTx
82+
(i, o)
83+
(walletAddress, txOutValue o)
84+
walletSk
8585

8686
send hydraNode $ input "Decommit" ["decommitTx" .= decommitTx]
8787

0 commit comments

Comments
 (0)