diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-04-28 18:40:10 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-04-28 18:40:10 +0800 |
commit | 91cb8cdd2acdcaceb577fd0ea9eb0997d42f8470 (patch) | |
tree | 35f36ea4a2cbc68a5b0410e4367d485db3ffe545 /p2p/discover/table_test.go | |
parent | e88b410b4d25c65b023b4ee7b4d1bc5dbc4dab93 (diff) | |
parent | 4992765032b4318f3f5b4940a553b4e552c55963 (diff) | |
download | go-tangerine-91cb8cdd2acdcaceb577fd0ea9eb0997d42f8470.tar go-tangerine-91cb8cdd2acdcaceb577fd0ea9eb0997d42f8470.tar.gz go-tangerine-91cb8cdd2acdcaceb577fd0ea9eb0997d42f8470.tar.bz2 go-tangerine-91cb8cdd2acdcaceb577fd0ea9eb0997d42f8470.tar.lz go-tangerine-91cb8cdd2acdcaceb577fd0ea9eb0997d42f8470.tar.xz go-tangerine-91cb8cdd2acdcaceb577fd0ea9eb0997d42f8470.tar.zst go-tangerine-91cb8cdd2acdcaceb577fd0ea9eb0997d42f8470.zip |
Merge pull request #793 from karalabe/discovery-node-cache
p2p/discover: persistent node database
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 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 { |