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 committed May 9, 2024
1 parent 56e5a5d commit 233e6cf
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
Original file line number Diff line number Diff line change
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 233e6cf

Please sign in to comment.