From d6172ca8b431114e9fff168736d725f04d4c6b36 Mon Sep 17 00:00:00 2001 From: Matt Drollette Date: Thu, 14 Dec 2017 22:13:50 -0600 Subject: [PATCH] discovery: correctly format ipv6 addresses from dns seed --- discovery/bootstrapper.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/discovery/bootstrapper.go b/discovery/bootstrapper.go index b79a46ee..b880c262 100644 --- a/discovery/bootstrapper.go +++ b/discovery/bootstrapper.go @@ -6,6 +6,7 @@ import ( "crypto/sha256" "fmt" "net" + "strconv" "strings" "github.com/davecgh/go-spew/spew" @@ -441,8 +442,8 @@ search: // Finally we'll convert the host:port peer to // a proper TCP address to use within the // lnwire.NetAddress. - addr := fmt.Sprintf("%v:%v", addrs[0], - nodeSrv.Port) + addr := net.JoinHostPort(addrs[0], + strconv.FormatUint(uint64(nodeSrv.Port), 10)) tcpAddr, err := net.ResolveTCPAddr("tcp", addr) if err != nil { return nil, err