aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/server_test.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-02-06 21:40:53 +0800
committerFelix Lange <fjl@twurst.com>2015-02-07 07:12:23 +0800
commit8564eb9f7efcc7a0e639f6a45d7e67037fedac5f (patch)
tree2b2ebde612d7d084b87b3eff9b6db0e08ea552ed /p2p/server_test.go
parent56f777b2fc77275bc636562b66a08b19afe2ec56 (diff)
downloaddexon-8564eb9f7efcc7a0e639f6a45d7e67037fedac5f.tar.gz
dexon-8564eb9f7efcc7a0e639f6a45d7e67037fedac5f.tar.zst
dexon-8564eb9f7efcc7a0e639f6a45d7e67037fedac5f.zip
p2p/discover: add node URL functions, distinguish TCP/UDP ports
The discovery RPC protocol does not yet distinguish TCP and UDP ports. But it can't hurt to do so in our internal model.
Diffstat (limited to 'p2p/server_test.go')
-rw-r--r--p2p/server_test.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/p2p/server_test.go b/p2p/server_test.go
index a05e01014..89300cf1c 100644
--- a/p2p/server_test.go
+++ b/p2p/server_test.go
@@ -91,8 +91,7 @@ func TestServerDial(t *testing.T) {
// tell the server to connect
tcpAddr := listener.Addr().(*net.TCPAddr)
- connAddr := &discover.Node{Addr: &net.UDPAddr{IP: tcpAddr.IP, Port: tcpAddr.Port}}
- srv.peerConnect <- connAddr
+ srv.peerConnect <- &discover.Node{IP: tcpAddr.IP, TCPPort: tcpAddr.Port}
select {
case conn := <-accepted: