mirror of
https://github.com/libp2p/go-libp2p.git
synced 2025-09-26 20:21:26 +08:00
swarm: deprecate libp2p.DialRanker option (#2430)
* swarm: deprecate libp2p.DialRanker option * remove whitespace diff * Apply suggestions from code review Co-authored-by: Marten Seemann <martenseemann@gmail.com> --------- Co-authored-by: Marten Seemann <martenseemann@gmail.com>
This commit is contained in:
@@ -579,6 +579,7 @@ func PrometheusRegisterer(reg prometheus.Registerer) Option {
|
||||
// DialRanker configures libp2p to use d as the dial ranker. To enable smart
|
||||
// dialing use `swarm.DefaultDialRanker`. use `swarm.NoDelayDialRanker` to
|
||||
// disable smart dialing.
|
||||
// Deprecated: use SwarmOpts(swarm.WithDialRanker(d)) instead
|
||||
func DialRanker(d network.DialRanker) Option {
|
||||
return func(cfg *Config) error {
|
||||
if cfg.DialRanker != nil {
|
||||
|
Reference in New Issue
Block a user