Skip to content

Commit

Permalink
Restore usage of persistenceIncremental in Hydra.Network.Reliability
Browse files Browse the repository at this point in the history
We do not want to update this module (yet) with a different means for persistence.
  • Loading branch information
ch1bo committed Mar 4, 2024
1 parent 9b9da57 commit e379909
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions hydra-node/src/Hydra/Network/Reliability.hs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ mkMessagePersistence ::
PersistenceIncremental (Heartbeat msg) m ->
Persistence (Vector Int) m ->
MessagePersistence m msg
mkMessagePersistence numberOfParties persistenceIncremental ackPersistence =
mkMessagePersistence numberOfParties msgPersistence ackPersistence =
MessagePersistence
{ loadAcks = do
macks <- load ackPersistence
Expand All @@ -199,13 +199,11 @@ mkMessagePersistence numberOfParties persistenceIncremental ackPersistence =
, saveAcks = \acks -> do
save ackPersistence acks
, loadMessages = do
loadAll persistenceIncremental
loadAll msgPersistence
, appendMessage = \msg -> do
append persistenceIncremental msg
append msgPersistence msg
}

-- TODO(Elaine): this can probably be replaced with new persistence

-- | Middleware function to handle message counters tracking and resending logic.
--
-- '''NOTE''': There is some "abstraction leak" here, because the `withReliability`
Expand Down

0 comments on commit e379909

Please sign in to comment.