From 61523364ddc17b49c6e4b29c22e62dad1a2a554c Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 29 Oct 2019 13:17:21 +0100 Subject: [PATCH] p2p/discover: rename lookup.next to 'advance' --- p2p/discover/lookup.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/p2p/discover/lookup.go b/p2p/discover/lookup.go index 4996df7a5d..f988e06838 100644 --- a/p2p/discover/lookup.go +++ b/p2p/discover/lookup.go @@ -57,14 +57,14 @@ func newLookup(ctx context.Context, tab *Table, target enode.ID, q queryFunc) *l // run runs the lookup to completion and returns the closest nodes found. func (it *lookup) run() []*enode.Node { - for it.next() { + for it.advance() { } return unwrapNodes(it.result.entries) } -// next advances the lookup until any new nodes have been found. +// advance advances the lookup until any new nodes have been found. // It returns false when the lookup has ended. -func (it *lookup) next() bool { +func (it *lookup) advance() bool { for it.startQueries() { select { case nodes := <-it.replyCh: @@ -194,7 +194,7 @@ func (it *lookupIterator) Next() bool { it.lookup = it.nextLookup(it.ctx) continue } - if !it.lookup.next() { + if !it.lookup.advance() { it.lookup = nil continue }