@@ -12,8 +12,6 @@ import (
12
12
"github.com/libp2p/go-libp2p-core/transport"
13
13
14
14
addrutil "github.com/libp2p/go-addr-util"
15
- lgbl "github.com/libp2p/go-libp2p-loggables"
16
-
17
15
ma "github.com/multiformats/go-multiaddr"
18
16
manet "github.com/multiformats/go-multiaddr/net"
19
17
)
@@ -236,20 +234,16 @@ func (s *Swarm) DialPeer(ctx context.Context, p peer.ID) (network.Conn, error) {
236
234
// It is gated by the swarm's dial synchronization systems: dialsync and
237
235
// dialbackoff.
238
236
func (s * Swarm ) dialPeer (ctx context.Context , p peer.ID ) (* Conn , error ) {
239
- log .Debugf ("[%s] swarm dialing peer [%s]" , s .local , p )
240
- var logdial = lgbl .Dial ("swarm" , s .LocalPeer (), p , nil , nil )
237
+ log .Debugw ("dialing peer" , "from" , s .local , "to" , p )
241
238
err := p .Validate ()
242
239
if err != nil {
243
240
return nil , err
244
241
}
245
242
246
243
if p == s .local {
247
- log .Event (ctx , "swarmDialSelf" , logdial )
248
244
return nil , ErrDialToSelf
249
245
}
250
246
251
- defer log .EventBegin (ctx , "swarmDialAttemptSync" , p ).Done ()
252
-
253
247
// check if we already have an open (usable) connection first
254
248
conn := s .bestAcceptableConnToPeer (ctx , p )
255
249
if conn != nil {
0 commit comments