Skip to content

Commit 94af00d

Browse files
committed
Perhaps fix the fanout
1 parent 4d7f5f0 commit 94af00d

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

hydra-node/src/Hydra/HeadLogic.hs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,15 +1268,19 @@ onClosedClientFanout closedState =
12681268
{ postChainTx =
12691269
FanoutTx
12701270
{ utxo
1271+
-- XXX: Perhaps move this check down so it can be more readily
1272+
-- tested.
1273+
-- Here we check that to include in the fanout; if the versions
1274+
-- are the same, the utxoToCommit or utxoToDecommit has not been
1275+
-- used on chain yet; so we disregard, so we must not fan it out.
12711276
, utxoToCommit =
1272-
-- NOTE: note that logic is flipped in the commit and decommit case here.
1273-
if toInteger snapshotVersion == max (toInteger version - 1) 0
1274-
then utxoToCommit
1275-
else Nothing
1277+
if snapshotVersion == version
1278+
then Nothing
1279+
else utxoToCommit
12761280
, utxoToDecommit =
1277-
if toInteger snapshotVersion == max (toInteger version - 1) 0
1278-
then Nothing
1279-
else utxoToDecommit
1281+
if snapshotVersion == version
1282+
then utxoToDecommit
1283+
else Nothing
12801284
, headSeed
12811285
, contestationDeadline
12821286
}

0 commit comments

Comments
 (0)