diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-04-24 23:04:41 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-04-24 23:04:41 +0800 |
commit | 8646365b42ddae30e596835b4512792ca11196a5 (patch) | |
tree | 03977b5bf677fa2a7e57953fba28c0aa21da6a88 /p2p/discover/table_test.go | |
parent | 6def110c37d4d43402c4b658ce6b291400f840e5 (diff) | |
download | go-tangerine-8646365b42ddae30e596835b4512792ca11196a5.tar go-tangerine-8646365b42ddae30e596835b4512792ca11196a5.tar.gz go-tangerine-8646365b42ddae30e596835b4512792ca11196a5.tar.bz2 go-tangerine-8646365b42ddae30e596835b4512792ca11196a5.tar.lz go-tangerine-8646365b42ddae30e596835b4512792ca11196a5.tar.xz go-tangerine-8646365b42ddae30e596835b4512792ca11196a5.tar.zst go-tangerine-8646365b42ddae30e596835b4512792ca11196a5.zip |
cmd/bootnode, eth, p2p, p2p/discover: use a fancier db design
Diffstat (limited to 'p2p/discover/table_test.go')
-rw-r--r-- | p2p/discover/table_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/p2p/discover/table_test.go b/p2p/discover/table_test.go index 8274731e3..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{}, nil) + 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{}, nil) + 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{}, nil) + tab := newTable(transport, self, &net.UDPAddr{}, "") // lookup on empty table returns no nodes if results := tab.Lookup(target); len(results) > 0 { |