mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-17 21:46:36 +00:00
p2p/discover: fix panicky test (#25038)
This commit is contained in:
parent
5e8fa1da70
commit
403624a4a1
1 changed files with 1 additions and 0 deletions
|
|
@ -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() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue