From 49b49fc23e192697809e0a8579892c6bdbe651d1 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 29 Oct 2019 13:35:00 +0100 Subject: [PATCH] cmd/devp2p: tweak crawler log message --- cmd/devp2p/crawl.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/devp2p/crawl.go b/cmd/devp2p/crawl.go index 27755f0d00..92aaad72a3 100644 --- a/cmd/devp2p/crawl.go +++ b/cmd/devp2p/crawl.go @@ -73,10 +73,6 @@ loop: case n := <-c.ch: c.updateNode(n) case it := <-doneCh: - liveIters-- - if liveIters == 0 { - break loop - } if it == c.inputIter { // Enable timeout when we're done revalidating the input nodes. log.Info("Revalidation of input set is done", "len", len(c.input)) @@ -84,6 +80,9 @@ loop: timeoutCh = timeoutTimer.C } } + if liveIters--; liveIters == 0 { + break loop + } case <-timeoutCh: break loop }