get rid of Router.NormalisePeerAddr

There was only one call site left and it always gets invoked with an
ip:port, so normalisation is a no-op.

Also remove mysterious comment.
This commit is contained in:
Matthias Radestock committed 2015-04-15 11:44:48 +01:00
1 parent 290d5443cc
commit 339f85cbcb
2 files changed
+2 -14

No files matched your search

-10
View File
@@ -417,13 +417,3 @@ func (router *Router) applyTopologyUpdate(update []byte) (PeerNameSet, PeerNameS
}
return origUpdate, newUpdate, nil
}
// given an address like '1.2.3.4:567', return the address if it has a port,
// otherwise return the address with the default port number for the router
func (router *Router) NormalisePeerAddr(peerAddr string) string {
_, _, err := net.SplitHostPort(peerAddr)
if err == nil {
return peerAddr
}
return fmt.Sprintf("%s:%d", peerAddr, router.Port)
}