go-libp2p
go-libp2p copied to clipboard
Dial worker loop simplification. Move backoff filtering together with other filters.
This is a small simplification that I believe will fix tricky points in the worker loop.
We should do backoff filtering along with other address filtering in swarm.filterKnownUndialables
This will clean up some of the awkward error handling here and here
see https://github.com/libp2p/go-libp2p/pull/2320#issuecomment-1597009229 for how black hole detection can be made to work with this.
As a follow up I'd like to change the worker loop interface to just take the list of addresses to dial with the ranking and the address filtering and ranking all happens before the worker loop.