From a0c97fcaed78b4ce1fb9f766e2a0396aad476ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 21 Aug 2018 20:45:08 +0300 Subject: [PATCH] miner: avoid microptimization in favor of cleaner code --- miner/worker.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/miner/worker.go b/miner/worker.go index e115df9656..6324f7fc9f 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -309,10 +309,6 @@ func (w *worker) newWorkLoop(recommit time.Duration) { next = float64(maxRecommitInterval.Nanoseconds()) } } else { - // Short circuit if the interval not larger than the minimal interval specified by user. - if recommit <= minRecommit { - return - } next = prev*(1-intervalAdjustRatio) + intervalAdjustRatio*(target-intervalAdjustBias) // Recap if interval is less than the user specified minimum if next < float64(minRecommit.Nanoseconds()) {