Skip to content

Commit

Permalink
diffusion: added TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
coot committed Feb 10, 2025
1 parent 3489b5a commit bd56d55
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ data ExtraArguments m =
-- to get a strong guarantee that when syncing up we will finish with a true
-- ledger state. When false, we will fall back on the previous algorithms
-- that leverage UseBootstrapPeers flag
--
-- TODO: duplicate, also present in `ExtraState`
, consensusMode :: ConsensusMode
}

-- TODO it should be called `extraArgsToPeerSelectionActions`. The module is
-- supposed to be imported qualified.
cardanoExtraArgsToPeerSelectionActions :: ExtraArguments m
-> ExtraPeerSelectionActions m
cardanoExtraArgsToPeerSelectionActions ExtraArguments {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ data ExtraPeerSelectionActions m =
genesisPeerTargets :: PeerSelectionTargets

-- | Read the current bootstrap peers flag
--
-- TODO: a duplicate, it's also in `ExtraArguments`
, readUseBootstrapPeers :: STM m UseBootstrapPeers
}

Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ cardanoPeerSelectionGovernorArgs
)
=> Cardano.ExtraPeerSelectionActions m
-> STM m UseLedgerPeers
-- ^ TODO: add to `ExtraPeerSelectionActions`
-> PeerSharing
-- ^ PeerSharing configuration option (not the negotiated one).
-> (OutboundConnectionsState -> STM m ())
-> PeerSelectionGovernorArgs
Cardano.ExtraState
Expand Down
2 changes: 2 additions & 0 deletions ouroboros-network/src/Ouroboros/Network/Diffusion.hs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ data ExtraTracers (p2p :: P2P) extraState extraDebugState extraFlags extraPeers

-- | Diffusion arguments which depend on p2p mode.
--
-- TODO: specifying `exception` in a type is bad.
-- TODO: swap order of `extraPeers` & `extraFlags` (for consistency sake)
data ArgumentsExtra
(p2p :: P2P) extraArgs extraState extraDebugState extraAPI
extraFlags extraPeers extraChurnArgs extraCounters exception ntnAddr resolver resolverError m where
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ nullTracersExtra =

-- | P2P Arguments Extras
--
-- TODO: this ought to be in `P2P` module.
data ArgumentsExtra extraState extraDebugState extraFlags extraPeers
extraAPI extraChurnArgs extraCounters exception
peeraddr resolver resolverError m = ArgumentsExtra {
Expand Down

0 comments on commit bd56d55

Please sign in to comment.