diff --git a/p2p/net/swarm/swarm.go b/p2p/net/swarm/swarm.go index 100a9826d..15e1ec5e1 100644 --- a/p2p/net/swarm/swarm.go +++ b/p2p/net/swarm/swarm.go @@ -152,6 +152,7 @@ func (s *Swarm) AddAddrFilter(f string) error { s.Filters.AddDialFilter(m) return nil } + func filterAddrs(listenAddrs []ma.Multiaddr) ([]ma.Multiaddr, error) { if len(listenAddrs) > 0 { filtered := addrutil.FilterUsableAddrs(listenAddrs) @@ -285,6 +286,10 @@ func (s *Swarm) LocalPeer() peer.ID { return s.local } +func (s *Swarm) Backoff() *dialbackoff { + return &s.backf +} + // notifyAll sends a signal to all Notifiees func (s *Swarm) notifyAll(notify func(inet.Notifiee)) { s.notifmu.RLock()