Skip to content

Commit e774ec2

Browse files
committed
Fix the loop in genFanoutTx/tx-cost
1 parent 35f4b05 commit e774ec2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hydra-node/bench/tx-cost/TxCost.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,14 @@ computeFanOutCost = do
256256
pure Nothing
257257

258258
-- Generate a fanout with a defined number of outputs.
259+
-- TODO: why are we not re-using the same functions from the Direct.State module?
259260
genFanoutTx numParties numOutputs = do
260261
utxo <- genUTxOAdaOnlyOfSize numOutputs
261262
ctx <- genHydraContextFor numParties
262263
(_committed, stOpen@OpenState{headId, seedTxIn}) <- genStOpen ctx
263264
utxoToCommit' <- oneof [arbitrary, pure Nothing]
264265
utxoToDecommit' <- oneof [arbitrary, pure Nothing]
265-
let (utxoToCommit, utxoToDecommit) = if isNothing utxoToCommit then (mempty, utxoToDecommit') else (utxoToCommit', mempty)
266+
let (utxoToCommit, utxoToDecommit) = if isNothing utxoToCommit' then (mempty, utxoToDecommit') else (utxoToCommit', mempty)
266267
snapshot <- genConfirmedSnapshot headId 0 1 utxo utxoToCommit utxoToDecommit [] -- We do not validate the signatures
267268
cctx <- pickChainContext ctx
268269
let cp = ctxContestationPeriod ctx

0 commit comments

Comments
 (0)