Skip to content

Commit

Permalink
Resolve TODO related to splitUTxO
Browse files Browse the repository at this point in the history
  • Loading branch information
v0d1ch authored and ch1bo committed Apr 17, 2024
1 parent 67a69ce commit a2e1c22
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hydra-node/test/Hydra/Chain/Direct/Contract/Decrement.hs
Expand Up @@ -30,7 +30,7 @@ import Hydra.Contract.HeadState qualified as Head
import Hydra.Crypto (HydraKey, MultiSignature (..), aggregate, sign, toPlutusSignatures)
import Hydra.Data.Party qualified as OnChain
import Hydra.Ledger (IsTx (hashUTxO, withoutUTxO))
import Hydra.Ledger.Cardano (adaOnly, genAddressInEra, genUTxOSized, genValue, genVerificationKey)
import Hydra.Ledger.Cardano (adaOnly, genUTxOSized, genValue, genVerificationKey)
import Hydra.Party (Party, deriveParty, partyToChain)
import Hydra.Plutus.Orphans ()
import Hydra.Snapshot (Snapshot (..), SnapshotNumber)
Expand All @@ -40,6 +40,7 @@ import Test.QuickCheck (arbitrarySizedNatural, choose, elements, oneof)
import Test.QuickCheck.Gen (suchThat)
import Test.QuickCheck.Instances ()
import Hydra.Chain.Direct.Contract.CollectCom (extractHeadOutputValue)
import Hydra.Chain.Direct.State (splitUTxO)

healthyDecrementTx :: (Tx, UTxO)
healthyDecrementTx =
Expand Down Expand Up @@ -99,8 +100,8 @@ healthySnapshotNumber = 1

healthySnapshot :: Snapshot Tx
healthySnapshot =
-- TODO: use splitUTxO generator
let (utxoToDecommit', utxo) = splitDecommitUTxO healthyUTxO
let (utxoToDecommit', utxo) = splitUTxO healthyUTxO `generateWith` 42

in Snapshot
{ headId = mkHeadId testPolicyId
, number = succ healthySnapshotNumber
Expand Down

0 comments on commit a2e1c22

Please sign in to comment.