Skip to content

Commit

Permalink
TOSQUASH re-consistent-ify ChainSync/Client.hs style
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrisby committed Dec 5, 2023
1 parent 4624455 commit 59b82d0
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ bracketChainSyncClient tracer ChainDbView { getIsInvalidBlock }

-- | State used when the intersection between the candidate and the current
-- chain is unknown.
data UnknownIntersectionState blk = UnknownIntersectionState
{ ourFrag :: !(AnchoredFragment (Header blk))
data UnknownIntersectionState blk = UnknownIntersectionState {
ourFrag :: !(AnchoredFragment (Header blk))
-- ^ A view of the current chain fragment. Note that this might be
-- temporarily out of date w.r.t. the actual current chain until we update
-- it again.
Expand All @@ -310,8 +310,8 @@ instance ( LedgerSupportsProtocol blk

-- | State used when the intersection between the candidate and the current
-- chain is known.
data KnownIntersectionState blk = KnownIntersectionState
{ theirFrag :: !(AnchoredFragment (Header blk))
data KnownIntersectionState blk = KnownIntersectionState {
theirFrag :: !(AnchoredFragment (Header blk))
-- ^ The candidate, the synched fragment of their chain.
--
-- See the \"Candidate fragment size\" note above.
Expand Down Expand Up @@ -452,8 +452,8 @@ assertKnownIntersectionInvariants cfg kis =
--
-- These are available before the diffusion layer is online.
data ConfigEnv m blk = ConfigEnv {
-- | The pipelining decider to use after 'MsgFoundIntersect' arrives
mkPipelineDecision0 :: MkPipelineDecision
-- ^ The pipelining decider to use after 'MsgFoundIntersect' arrives
, tracer :: Tracer m (TraceChainSyncClientEvent blk)
, cfg :: TopLevelConfig blk
, someHeaderInFutureCheck :: InFutureCheck.SomeHeaderInFutureCheck m blk
Expand Down Expand Up @@ -1328,8 +1328,7 @@ data UpdatedIntersectionState blk a =
-- (The intersection could also be lost because of messages they sent, but
-- that's handled elsewhere, not involving this data type.)
NoLongerIntersects
|
StillIntersects a !(KnownIntersectionState blk)
| StillIntersects a !(KnownIntersectionState blk)

data Intersects blk a =
Intersects
Expand Down

0 comments on commit 59b82d0

Please sign in to comment.