From e3799090552411d31f1cbc5a1a1c1f3779e0e2f3 Mon Sep 17 00:00:00 2001 From: Sebastian Nagel Date: Mon, 4 Mar 2024 19:32:21 +0100 Subject: [PATCH] Restore usage of persistenceIncremental in Hydra.Network.Reliability We do not want to update this module (yet) with a different means for persistence. --- hydra-node/src/Hydra/Network/Reliability.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hydra-node/src/Hydra/Network/Reliability.hs b/hydra-node/src/Hydra/Network/Reliability.hs index 56cc93b0e1c..9b13c74c253 100644 --- a/hydra-node/src/Hydra/Network/Reliability.hs +++ b/hydra-node/src/Hydra/Network/Reliability.hs @@ -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 @@ -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`