diff --git a/p2p/listener.go b/p2p/listener.go index e80881259..06ff02863 100644 --- a/p2p/listener.go +++ b/p2p/listener.go @@ -160,7 +160,7 @@ func getUPNPExternalAddress(externalPort, internalPort int) *NetAddress { log.Debug("Getting UPNP external address") nat, err := upnp.Discover() if err != nil { - log.Debug("Could not get UPNP extrernal address", "error", err) + log.Debug("Could not perform UPNP discover", "error", err) return nil } @@ -177,7 +177,7 @@ func getUPNPExternalAddress(externalPort, internalPort int) *NetAddress { externalPort, err = nat.AddPortMapping("tcp", externalPort, internalPort, "tendermint", 0) if err != nil { - log.Debug("Could not get UPNP external address", "error", err) + log.Debug("Could not add UPNP port mapping", "error", err) return nil } diff --git a/p2p/pex_reactor.go b/p2p/pex_reactor.go index b6a070f46..d32888ff8 100644 --- a/p2p/pex_reactor.go +++ b/p2p/pex_reactor.go @@ -101,7 +101,7 @@ func (pexR *PEXReactor) Receive(chId byte, src *Peer, msgBytes []byte) { } log.Info("Received message", "msg", msg) - switch msg.(type) { + switch msgT := msg.(type) { case *pexRequestMessage: // src requested some peers. // TODO: prevent abuse. @@ -111,7 +111,7 @@ func (pexR *PEXReactor) Receive(chId byte, src *Peer, msgBytes []byte) { // TODO: prevent abuse. // (We don't want to get spammed with bad peers) srcAddr := src.Connection().RemoteAddress - for _, addr := range msg.(*pexAddrsMessage).Addrs { + for _, addr := range msgT.Addrs { pexR.book.AddAddress(addr, srcAddr) } default: