discovery: correctly format ipv6 addresses from dns seed
This commit is contained in:
1 parent
b74b9fc16e
commit
d6172ca8b4
1 file changed
+3
-2
@@ -6,6 +6,7 @@ import (
|
|||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
"github.com/davecgh/go-spew/spew"
|
||||||
@@ -441,8 +442,8 @@ search:
|
|||||||
// Finally we'll convert the host:port peer to
|
// Finally we'll convert the host:port peer to
|
||||||
// a proper TCP address to use within the
|
// a proper TCP address to use within the
|
||||||
// lnwire.NetAddress.
|
// lnwire.NetAddress.
|
||||||
addr := fmt.Sprintf("%v:%v", addrs[0],
|
addr := net.JoinHostPort(addrs[0],
|
||||||
nodeSrv.Port)
|
strconv.FormatUint(uint64(nodeSrv.Port), 10))
|
||||||
tcpAddr, err := net.ResolveTCPAddr("tcp", addr)
|
tcpAddr, err := net.ResolveTCPAddr("tcp", addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Reference in new issue
Block a user