From bd5a270f12a58f711090d5e5ff771ff26c195cfa Mon Sep 17 00:00:00 2001 From: EncodePanda Date: Mon, 18 Jan 2021 14:42:22 +0100 Subject: [PATCH] Rename rdr to flr --- .../Consensus/MiniProtocol/ChainSync/Server.hs | 8 ++++---- .../src/Ouroboros/Consensus/Storage/ChainDB/API.hs | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ouroboros-consensus/src/Ouroboros/Consensus/MiniProtocol/ChainSync/Server.hs b/ouroboros-consensus/src/Ouroboros/Consensus/MiniProtocol/ChainSync/Server.hs index 281bbe5b32a..58599690ec4 100644 --- a/ouroboros-consensus/src/Ouroboros/Consensus/MiniProtocol/ChainSync/Server.hs +++ b/ouroboros-consensus/src/Ouroboros/Consensus/MiniProtocol/ChainSync/Server.hs @@ -98,7 +98,7 @@ chainSyncServerForFollower :: -> ChainDB m blk -> Follower m blk (WithPoint blk b) -> ChainSyncServer b (Point blk) (Tip blk) m () -chainSyncServerForFollower tracer chainDB rdr = +chainSyncServerForFollower tracer chainDB flr = idle' where idle :: ServerStIdle b (Point blk) (Tip blk) m () @@ -113,7 +113,7 @@ chainSyncServerForFollower tracer chainDB rdr = handleRequestNext :: m (Either (ServerStNext b (Point blk) (Tip blk) m ()) (m (ServerStNext b (Point blk) (Tip blk) m ()))) - handleRequestNext = ChainDB.followerInstruction rdr >>= \case + handleRequestNext = ChainDB.followerInstruction flr >>= \case Just update -> do tip <- atomically $ ChainDB.getCurrentTip chainDB traceWith tracer $ @@ -122,7 +122,7 @@ chainSyncServerForFollower tracer chainDB rdr = Nothing -> return $ Right $ do -- Follower is at the head, we have to block and wait for the chain to -- change. - update <- ChainDB.followerInstructionBlocking rdr + update <- ChainDB.followerInstructionBlocking flr tip <- atomically $ ChainDB.getCurrentTip chainDB traceWith tracer $ TraceChainSyncServerReadBlocked tip (point <$> update) @@ -139,7 +139,7 @@ chainSyncServerForFollower tracer chainDB rdr = -> m (ServerStIntersect b (Point blk) (Tip blk) m ()) handleFindIntersect points = do -- TODO guard number of points - changed <- ChainDB.followerForward rdr points + changed <- ChainDB.followerForward flr points tip <- atomically $ ChainDB.getCurrentTip chainDB return $ case changed of Just pt -> SendMsgIntersectFound pt tip idle' diff --git a/ouroboros-consensus/src/Ouroboros/Consensus/Storage/ChainDB/API.hs b/ouroboros-consensus/src/Ouroboros/Consensus/Storage/ChainDB/API.hs index 8f1bb93f98e..16eece88493 100644 --- a/ouroboros-consensus/src/Ouroboros/Consensus/Storage/ChainDB/API.hs +++ b/ouroboros-consensus/src/Ouroboros/Consensus/Storage/ChainDB/API.hs @@ -657,11 +657,11 @@ traverseFollower => (b -> m b') -> Follower m blk b -> Follower m blk b' -traverseFollower f rdr = Follower - { followerInstruction = followerInstruction rdr >>= traverse (traverse f) - , followerInstructionBlocking = followerInstructionBlocking rdr >>= traverse f - , followerForward = followerForward rdr - , followerClose = followerClose rdr +traverseFollower f flr = Follower + { followerInstruction = followerInstruction flr >>= traverse (traverse f) + , followerInstructionBlocking = followerInstructionBlocking flr >>= traverse f + , followerForward = followerForward flr + , followerClose = followerClose flr } {-------------------------------------------------------------------------------