p2p/discover: fix lint

This commit is contained in:
Felix Lange 2024-05-29 01:24:19 +02:00
parent 38fbf4cc7f
commit 8958fe8637
3 changed files with 0 additions and 18 deletions

View file

@ -84,10 +84,6 @@ func unwrapNodes(ns []*tableNode) []*enode.Node {
return result return result
} }
func (n *tableNode) addr() *net.UDPAddr {
return &net.UDPAddr{IP: n.IP(), Port: n.UDP()}
}
func (n *tableNode) String() string { func (n *tableNode) String() string {
return n.Node.String() return n.Node.String()
} }

View file

@ -473,18 +473,6 @@ func nodeIDEqual[N nodeType](n1, n2 N) bool {
return n1.ID() == n2.ID() 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. // gen wraps quick.Value so it's easier to use.
// it generates a random value of the given value's type. // it generates a random value of the given value's type.
func gen(typ interface{}, rand *rand.Rand) interface{} { func gen(typ interface{}, rand *rand.Rand) interface{} {

View file

@ -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. // if the bucket is not full. The caller must not hold tab.mutex.
func fillTable(tab *Table, nodes []*enode.Node, setLive bool) { func fillTable(tab *Table, nodes []*enode.Node, setLive bool) {
for _, n := range nodes { for _, n := range nodes {
if setLive {
}
tab.addFoundNode(n, setLive) tab.addFoundNode(n, setLive)
} }
} }