From fb6951699403c1e1ea6de7c38b0efa205deb84c0 Mon Sep 17 00:00:00 2001 From: Franco Testagrossa Date: Fri, 15 Mar 2024 09:34:13 +0100 Subject: [PATCH] Add missing seen contestationDeadline when aggregating a close head observation --- hydra-explorer/src/Hydra/Explorer/ExplorerState.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hydra-explorer/src/Hydra/Explorer/ExplorerState.hs b/hydra-explorer/src/Hydra/Explorer/ExplorerState.hs index ba4e9debd52..520fad59c50 100644 --- a/hydra-explorer/src/Hydra/Explorer/ExplorerState.hs +++ b/hydra-explorer/src/Hydra/Explorer/ExplorerState.hs @@ -229,7 +229,13 @@ aggregateCloseObservation :: HeadId -> ChainPoint -> BlockNo -> SnapshotNumber - aggregateCloseObservation headId point blockNo (UnsafeSnapshotNumber sn) contestationDeadline currentHeads = case findHeadState headId currentHeads of Just headState -> - let newHeadState = headState{status = Closed, contestations = Seen 0, snapshotNumber = Seen sn} + let newHeadState = + headState + { status = Closed + , contestations = Seen 0 + , snapshotNumber = Seen sn + , contestationDeadline = Seen contestationDeadline + } in replaceHeadState newHeadState currentHeads Nothing -> currentHeads <> [newUnknownHeadState] where