Skip to content

Commit

Permalink
Make model aware of outdated snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1bo committed Jul 23, 2024
1 parent 3467137 commit 06e60a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hydra-node/test/Hydra/Chain/Direct/TxTraceSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ instance StateModel Model where
-- XXX: Ignore fanouts which does not preserve the closing head

nextState :: Model -> Action Model a -> Var a -> Model
nextState m t _result =
nextState m@Model{currentVersion} t _result =
case t of
Stop -> m
Decrement{snapshot} ->
Expand All @@ -479,7 +479,7 @@ instance StateModel Model where
, latestSnapshot = snapshot.number
, alreadyContested = []
, utxoInHead = snapshotUTxO snapshot
, pendingDecommitUTxO = decommitUTxO snapshot
, pendingDecommitUTxO = if currentVersion == snapshot.version then decommitUTxO snapshot else mempty
}
Contest{actor, snapshot} ->
m
Expand Down

0 comments on commit 06e60a6

Please sign in to comment.