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:
Sukun
2023-07-14 11:46:12 +05:30
committed by GitHub
parent 70c19cbce3
commit 381f23057b
3 changed files with 6 additions and 5 deletions

View File

@@ -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 {