提交 05817373 作者: Jeromy

Clear up naming around zero address

上级 402fdd2d
......@@ -128,7 +128,7 @@ func (s *Swarm) Dial(peer peer.Peer) (conn.Conn, error) {
Peerstore: s.peers,
}
// If we are attempting to connect to a loopback addr, fail out early
// If we are attempting to connect to the zero addr, fail out early
raddr := peer.NetAddress("tcp")
if raddr == nil {
return nil, fmt.Errorf("No remote address for network tcp")
......
......@@ -115,7 +115,7 @@ func GetenvBool(name string) bool {
// IsLoopbackAddr returns whether or not the ip portion of the passed in multiaddr
// string is a loopback address
func IsLoopbackAddr(addr string) bool {
loops := []string{"/ip4/127.0.0.1", "/ip6/::1", "/ip4/0.0.0.0"}
loops := []string{"/ip4/127.0.0.1", "/ip6/::1"}
for _, loop := range loops {
if strings.HasPrefix(addr, loop) {
return true
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论