diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-04-24 00:40:35 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-04-24 16:23:20 +0800 |
commit | 971702e7a1a5e698721fa6147c444abad9c20141 (patch) | |
tree | e56167758bb20c990926028009670a970f3862bb | |
parent | af923c965ff7a4e652d5c9edabc50f7a03e1135d (diff) | |
download | go-tangerine-971702e7a1a5e698721fa6147c444abad9c20141.tar.gz go-tangerine-971702e7a1a5e698721fa6147c444abad9c20141.tar.zst go-tangerine-971702e7a1a5e698721fa6147c444abad9c20141.zip |
p2p/discovery: fix broken tests due to API update
-rw-r--r-- | p2p/discover/table_test.go | 6 | ||||
-rw-r--r-- | p2p/discover/udp_test.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/p2p/discover/table_test.go b/p2p/discover/table_test.go index a98376bca..e2bd3c8ad 100644 --- a/p2p/discover/table_test.go +++ b/p2p/discover/table_test.go @@ -15,7 +15,7 @@ import ( func TestTable_pingReplace(t *testing.T) { doit := func(newNodeIsResponding, lastInBucketIsResponding bool) { transport := newPingRecorder() - tab := newTable(transport, NodeID{}, &net.UDPAddr{}) + tab := newTable(transport, NodeID{}, &net.UDPAddr{}, "") last := fillBucket(tab, 200) pingSender := randomID(tab.self.ID, 200) @@ -145,7 +145,7 @@ func TestTable_closest(t *testing.T) { test := func(test *closeTest) bool { // for any node table, Target and N - tab := newTable(nil, test.Self, &net.UDPAddr{}) + tab := newTable(nil, test.Self, &net.UDPAddr{}, "") tab.add(test.All) // check that doClosest(Target, N) returns nodes @@ -217,7 +217,7 @@ func TestTable_Lookup(t *testing.T) { self := gen(NodeID{}, quickrand).(NodeID) target := randomID(self, 200) transport := findnodeOracle{t, target} - tab := newTable(transport, self, &net.UDPAddr{}) + tab := newTable(transport, self, &net.UDPAddr{}, "") // lookup on empty table returns no nodes if results := tab.Lookup(target); len(results) > 0 { diff --git a/p2p/discover/udp_test.go b/p2p/discover/udp_test.go index c6c4d78e3..782895e46 100644 --- a/p2p/discover/udp_test.go +++ b/p2p/discover/udp_test.go @@ -41,7 +41,7 @@ func newUDPTest(t *testing.T) *udpTest { remotekey: newkey(), remoteaddr: &net.UDPAddr{IP: net.IP{1, 2, 3, 4}, Port: 30303}, } - test.table, test.udp = newUDP(test.localkey, test.pipe, nil) + test.table, test.udp = newUDP(test.localkey, test.pipe, nil, "") return test } |