From 06e60a6154ffb5a1aada089d3194369ebd902399 Mon Sep 17 00:00:00 2001 From: Sebastian Nagel Date: Tue, 23 Jul 2024 10:09:34 +0200 Subject: [PATCH] Make model aware of outdated snapshots --- hydra-node/test/Hydra/Chain/Direct/TxTraceSpec.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hydra-node/test/Hydra/Chain/Direct/TxTraceSpec.hs b/hydra-node/test/Hydra/Chain/Direct/TxTraceSpec.hs index 75566fb5837..e15e50d9337 100644 --- a/hydra-node/test/Hydra/Chain/Direct/TxTraceSpec.hs +++ b/hydra-node/test/Hydra/Chain/Direct/TxTraceSpec.hs @@ -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} -> @@ -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