p2p/discover/table_reval: fix unused arguments in calling func

This commit is contained in:
Huy Ngo 2025-02-11 16:23:42 +07:00
parent 4cda8f06ea
commit 4e73d3fc0c
No known key found for this signature in database

View file

@ -79,7 +79,7 @@ func (tr *tableRevalidation) nodeEndpointChanged(tab *Table, n *tableNode) {
func (tr *tableRevalidation) run(tab *Table, now mclock.AbsTime) (nextTime mclock.AbsTime) { func (tr *tableRevalidation) run(tab *Table, now mclock.AbsTime) (nextTime mclock.AbsTime) {
reval := func(list *revalidationList) { reval := func(list *revalidationList) {
if list.nextTime <= now { if list.nextTime <= now {
if n := list.get(now, &tab.rand, tr.activeReq); n != nil { if n := list.get(&tab.rand, tr.activeReq); n != nil {
tr.startRequest(tab, n) tr.startRequest(tab, n)
} }
// Update nextTime regardless if any requests were started because // Update nextTime regardless if any requests were started because
@ -203,7 +203,7 @@ type revalidationList struct {
} }
// get returns a random node from the queue. Nodes in the 'exclude' map are not returned. // get returns a random node from the queue. Nodes in the 'exclude' map are not returned.
func (list *revalidationList) get(now mclock.AbsTime, rand randomSource, exclude map[enode.ID]struct{}) *tableNode { func (list *revalidationList) get(rand randomSource, exclude map[enode.ID]struct{}) *tableNode {
if len(list.nodes) == 0 { if len(list.nodes) == 0 {
return nil return nil
} }