From 97afa2815beefec5bb90a06b0fcf06ec25d99eb8 Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Fri, 12 Sep 2025 11:29:43 +0200 Subject: [PATCH] Revert "p2p/discover: add test for lookup returning immediately" This reverts commit 3eab4616a69bc313a94f073e24cd5093b0dc922b. --- p2p/discover/v4_lookup_test.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/p2p/discover/v4_lookup_test.go b/p2p/discover/v4_lookup_test.go index 88ca82039e..29a9dd6645 100644 --- a/p2p/discover/v4_lookup_test.go +++ b/p2p/discover/v4_lookup_test.go @@ -23,7 +23,6 @@ import ( "slices" "sync" "testing" - "time" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p/discover/v4wire" @@ -35,15 +34,11 @@ func TestUDPv4_Lookup(t *testing.T) { t.Parallel() test := newUDPTest(t) - // Lookup on empty table returns immediately with no nodes. + // Lookup on empty table returns no nodes. targetKey, _ := v4wire.DecodePubkey(crypto.S256(), lookupTestnet.target) - start := time.Now() if results := test.udp.LookupPubkey(targetKey); len(results) > 0 { t.Fatalf("lookup on empty table returned %d results: %#v", len(results), results) } - if time.Since(start) > 100*time.Millisecond { - t.Fatalf("lookup on empty table took too long: %s", time.Since(start)) - } // Seed table with initial node. fillTable(test.table, []*enode.Node{lookupTestnet.node(256, 0)}, true)