Skip to content

Commit

Permalink
Add missing seen contestationDeadline when aggregating a close head o…
Browse files Browse the repository at this point in the history
…bservation
  • Loading branch information
ffakenz committed Mar 15, 2024
1 parent 7e56603 commit fb69516
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion hydra-explorer/src/Hydra/Explorer/ExplorerState.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fb69516

Please sign in to comment.