From 8958fe863763eb5aefb3b245af4918272dbcf21b Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 29 May 2024 01:24:19 +0200 Subject: [PATCH] p2p/discover: fix lint --- p2p/discover/node.go | 4 ---- p2p/discover/table_test.go | 12 ------------ p2p/discover/table_util_test.go | 2 -- 3 files changed, 18 deletions(-) diff --git a/p2p/discover/node.go b/p2p/discover/node.go index d3afb39b85..42ca8321f3 100644 --- a/p2p/discover/node.go +++ b/p2p/discover/node.go @@ -84,10 +84,6 @@ func unwrapNodes(ns []*tableNode) []*enode.Node { return result } -func (n *tableNode) addr() *net.UDPAddr { - return &net.UDPAddr{IP: n.IP(), Port: n.UDP()} -} - func (n *tableNode) String() string { return n.Node.String() } diff --git a/p2p/discover/table_test.go b/p2p/discover/table_test.go index 26eabfcc86..30e7d56f4a 100644 --- a/p2p/discover/table_test.go +++ b/p2p/discover/table_test.go @@ -473,18 +473,6 @@ func nodeIDEqual[N nodeType](n1, n2 N) bool { return n1.ID() == n2.ID() } -func slicesEqual[T any](s1, s2 []T, check func(e1, e2 T) bool) bool { - if len(s1) != len(s2) { - return false - } - for i := range s1 { - if !check(s1[i], s2[i]) { - return false - } - } - return true -} - // gen wraps quick.Value so it's easier to use. // it generates a random value of the given value's type. func gen(typ interface{}, rand *rand.Rand) interface{} { diff --git a/p2p/discover/table_util_test.go b/p2p/discover/table_util_test.go index 05c4c8ba3d..997ac37799 100644 --- a/p2p/discover/table_util_test.go +++ b/p2p/discover/table_util_test.go @@ -121,8 +121,6 @@ func fillBucket(tab *Table, id enode.ID) (last *tableNode) { // if the bucket is not full. The caller must not hold tab.mutex. func fillTable(tab *Table, nodes []*enode.Node, setLive bool) { for _, n := range nodes { - if setLive { - } tab.addFoundNode(n, setLive) } }