From 108bf9937d5302559225b5a6e3ef7de942e6400a Mon Sep 17 00:00:00 2001 From: ucwong Date: Thu, 2 Apr 2020 07:58:14 +0000 Subject: [PATCH] miner/worker | add timer stop to miner --- miner/worker.go | 1 + 1 file changed, 1 insertion(+) diff --git a/miner/worker.go b/miner/worker.go index d3cd10ed26..59a47a1220 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -297,6 +297,7 @@ func (w *worker) newWorkLoop(recommit time.Duration) { ) timer := time.NewTimer(0) + defer timer.Stop() <-timer.C // discard the initial tick // commit aborts in-flight transaction execution with given signal and resubmits a new one.