Unverified Commit 403624a4 authored by Martin Holst Swende's avatar Martin Holst Swende Committed by GitHub

p2p/discover: fix panicky test (#25038)

parent 5e8fa1da
...@@ -284,6 +284,7 @@ func TestUDPv4_findnode(t *testing.T) { ...@@ -284,6 +284,7 @@ func TestUDPv4_findnode(t *testing.T) {
test.waitPacketOut(func(p *v4wire.Neighbors, to *net.UDPAddr, hash []byte) { test.waitPacketOut(func(p *v4wire.Neighbors, to *net.UDPAddr, hash []byte) {
if len(p.Nodes) != len(want) { if len(p.Nodes) != len(want) {
t.Errorf("wrong number of results: got %d, want %d", len(p.Nodes), bucketSize) t.Errorf("wrong number of results: got %d, want %d", len(p.Nodes), bucketSize)
return
} }
for i, n := range p.Nodes { for i, n := range p.Nodes {
if n.ID.ID() != want[i].ID() { if n.ID.ID() != want[i].ID() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment