miner/worker: add missing timer.Stop call (#20857)

This commit is contained in:
ucwong 2020-04-02 16:40:38 +08:00 committed by GitHub
parent c87cdd3053
commit ad4b60efdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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.