Skip to content

Commit

Permalink
Rename rdr to flr
Browse files Browse the repository at this point in the history
  • Loading branch information
EncodePanda committed Jan 19, 2021
1 parent bb12df7 commit bd5a270
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Expand Up @@ -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 ()
Expand All @@ -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 $
Expand All @@ -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)
Expand All @@ -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'
Expand Down
Expand Up @@ -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
}

{-------------------------------------------------------------------------------
Expand Down

0 comments on commit bd5a270

Please sign in to comment.