p2p/discover: track sha3(ID) in Node

This commit is contained in:
Felix Lange
2015-04-23 12:11:21 +02:00
parent b34a8ef624
commit 72ab6d3255
8 changed files with 166 additions and 99 deletions

View File

@ -224,7 +224,7 @@ func TestTable_Lookup(t *testing.T) {
t.Fatalf("lookup on empty table returned %d results: %#v", len(results), results)
}
// seed table with initial node (otherwise lookup will terminate immediately)
tab.add([]*Node{newNode(randomID(target, 200), &net.UDPAddr{Port: 200})})
tab.add([]*Node{newNode(randomID(target, 200), net.ParseIP("127.0.0.1"), 200, 200)})
results := tab.Lookup(target)
t.Logf("results:")