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.
The
withPeerSelectionActionsis quite shallow. We should pull code fromOuroboros.Network.Diffusionmodule to it, so that it'swithPeerSelectionActionsthat create thePeerSelectionAcctionsrather than a callback that does all the work. I think, this can be done so thatgetLedgerPeerscallback is not longer passed in a negative position, but rather as a a regular argument.