Skip to content

Commit

Permalink
TOSQUASH last alignment fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrisby committed Jan 21, 2021
1 parent 6a2f2cb commit 3cefd20
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ data Cmd blk it flr
-- ^ Only for blocks that may have been garbage collected.
| IteratorClose it
| NewFollower
| FollowerInstruction flr
| FollowerInstruction flr
-- ^ 'followerInstructionBlocking' is excluded, as it requires multiple
-- threads. Its code path is pretty much the same as 'followerInstruction'
-- anyway.
| FollowerForward flr [Point blk]
| FollowerClose flr
| FollowerForward flr [Point blk]
| FollowerClose flr
| Close
| Reopen
-- Internal
Expand Down Expand Up @@ -637,7 +637,7 @@ type DBModel blk = Model.Model blk
data Model blk m r = Model
{ dbModel :: DBModel blk
, knownIters :: KnownIters blk m r
, knownFollowers :: KnownFollowers blk m r
, knownFollowers :: KnownFollowers blk m r
, modelConfig :: Opaque (TopLevelConfig blk)
} deriving (Generic)

Expand Down Expand Up @@ -1549,7 +1549,7 @@ traceEventName = \case
TraceFollowerEvent ev -> "Follower." <> constrName ev
TraceCopyToImmutableDBEvent ev -> "CopyToImmutableDB." <> constrName ev
TraceInitChainSelEvent ev -> "InitChainSel." <> case ev of
InitChainSelValidation ev' -> constrName ev'
InitChainSelValidation ev' -> constrName ev'
TraceOpenEvent ev -> "Open." <> constrName ev
TraceGCEvent ev -> "GC." <> constrName ev
TraceIteratorEvent ev -> "Iterator." <> constrName ev
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,8 @@ closeAllFollowers ::
=> ChainDbEnv m blk
-> m ()
closeAllFollowers CDB{..} = do
followerHandles <- atomically $ do
followerHandles <- Map.elems <$> readTVar cdbFollowers
writeTVar cdbFollowers Map.empty
return followerHandles
mapM_ fhClose followerHandles
followerHandles <- atomically $ do
followerHandles <- Map.elems <$> readTVar cdbFollowers
writeTVar cdbFollowers Map.empty
return followerHandles
mapM_ fhClose followerHandles
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ findFirstPoint ps = Chain.findFirstPoint ps . producerChain
-- 'FollowerId'.
--
initFollower :: HasHeader block
=> Point block
-> ChainProducerState block
-> (ChainProducerState block, FollowerId)
=> Point block
-> ChainProducerState block
-> (ChainProducerState block, FollowerId)
initFollower point (ChainProducerState c cflrst cfid) =
assert (pointOnChain point c) $
(ChainProducerState c (Map.insert cfid flrst cflrst) (succ cfid), cfid)
Expand Down

0 comments on commit 3cefd20

Please sign in to comment.