diff options
author | Felix Lange <fjl@twurst.com> | 2015-04-18 07:50:31 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-04-30 20:57:33 +0800 |
commit | fc747ef4a649cd90aec5193a8af6b7accb5eb03f (patch) | |
tree | b81f4b1fb00abd2bf05b4d586b0b3f08d2011cd5 /p2p/server.go | |
parent | 3fef60190384106af390dd23a65384b9cc6e4a28 (diff) | |
download | dexon-fc747ef4a649cd90aec5193a8af6b7accb5eb03f.tar dexon-fc747ef4a649cd90aec5193a8af6b7accb5eb03f.tar.gz dexon-fc747ef4a649cd90aec5193a8af6b7accb5eb03f.tar.bz2 dexon-fc747ef4a649cd90aec5193a8af6b7accb5eb03f.tar.lz dexon-fc747ef4a649cd90aec5193a8af6b7accb5eb03f.tar.xz dexon-fc747ef4a649cd90aec5193a8af6b7accb5eb03f.tar.zst dexon-fc747ef4a649cd90aec5193a8af6b7accb5eb03f.zip |
p2p/discover: new endpoint format
This commit changes the discovery protocol to use the new "v4" endpoint
format, which allows for separate UDP and TCP ports and makes it
possible to discover the UDP address after NAT.
Diffstat (limited to 'p2p/server.go')
-rw-r--r-- | p2p/server.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/p2p/server.go b/p2p/server.go index 5c5883ae8..e648c72c9 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -394,7 +394,7 @@ func (srv *Server) dialLoop() { } func (srv *Server) dialNode(dest *discover.Node) { - addr := &net.TCPAddr{IP: dest.IP, Port: dest.TCPPort} + addr := &net.TCPAddr{IP: dest.IP, Port: int(dest.TCP)} glog.V(logger.Debug).Infof("Dialing %v\n", dest) conn, err := srv.Dialer.Dial("tcp", addr.String()) if err != nil { |