Skip to content

Commit

Permalink
Aggregate networkId and version into ExplorerState
Browse files Browse the repository at this point in the history
Note that there is a lot of code that can be DRYed and the aggregation
is generally very conservative, not updating data if matching heads are
found even in presence of potentially different observation data.

Added property tests for network and version not being updated to make
that clear.
  • Loading branch information
ch1bo committed Jan 31, 2025
1 parent 2e41821 commit 2a2033c
Show file tree
Hide file tree
Showing 4 changed files with 264 additions and 104 deletions.
1 change: 0 additions & 1 deletion hydra-explorer/src/Hydra/Explorer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ aggregator :: PopObservation -> ModifyExplorerState -> IO ()
aggregator popObservation modifyExplorerState =
forever $ do
-- TODO: IO does not compose as well as STM
-- FIXME: use network and version
(network, version, observation) <- popObservation
modifyExplorerState $ aggregateObservation network version observation

Expand Down
Loading

0 comments on commit 2a2033c

Please sign in to comment.