From 1a3e915580f14de645f14c0b0e94255c76539574 Mon Sep 17 00:00:00 2001 From: cokemine Date: Wed, 13 Nov 2024 00:00:32 +0900 Subject: [PATCH] fix(swarm): incorrect error message format order --- p2p/net/swarm/swarm_dial.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/net/swarm/swarm_dial.go b/p2p/net/swarm/swarm_dial.go index 0d5020fa04..35fc567fd8 100644 --- a/p2p/net/swarm/swarm_dial.go +++ b/p2p/net/swarm/swarm_dial.go @@ -627,7 +627,7 @@ func (s *Swarm) dialAddr(ctx context.Context, p peer.ID, addr ma.Multiaddr, updC // Trust the transport? Yeah... right. if connC.RemotePeer() != p { connC.Close() - err = fmt.Errorf("BUG in transport %T: tried to dial %s, dialed %s", p, connC.RemotePeer(), tpt) + err = fmt.Errorf("BUG in transport %T: tried to dial %s, dialed %s", tpt, p, connC.RemotePeer()) log.Error(err) return nil, err }