Skip to content

p2p/discover: remove unused parameter in revalidationList.get #2265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions p2p/discover/table_reval.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (tr *tableRevalidation) nodeEndpointChanged(tab *Table, n *tableNode) {
func (tr *tableRevalidation) run(tab *Table, now mclock.AbsTime) (nextTime mclock.AbsTime) {
reval := func(list *revalidationList) {
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)
}
// Update nextTime regardless if any requests were started because
Expand Down Expand Up @@ -203,7 +203,7 @@ type revalidationList struct {
}

// 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 {
return nil
}
Expand Down