IntersectMBO / IntersectMBO/ouroboros-network

withPeerSelectionActions - refactorisation

Open
#5,401 0 comments 0 reactions 0 assignees Claimed by @coot View on GitHub
maintenance technical debt
Dominant language
Haskell
Stars
296
Forks
104
Avg merge
2d 10h
Merged PRs (30d)
4

Description

The `withPeerSelectionActions` is quite shallow. We should pull code from `Ouroboros.Network.Diffusion` module to it, so that it's `withPeerSelectionActions` that create the `PeerSelectionAcctions` rather than a callback that does all the work. I think, this can be done so that `getLedgerPeers` callback is not longer passed in a negative position, but rather as a a regular argument.

Contributor guide

Open the contributing guide

Research direction

Start by reading withPeerSelectionActions and Ouroboros.Network.Diffusion, focusing on how PeerSelectionAcctions are currently created and where getLedgerPeers is passed. Trace the callback flow and confirm the refactor's done state: withPeerSelectionActions creates the actions itself and getLedgerPeers is a regular argument rather than a negative-position callback.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
networking
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.