diff --git a/miner/scroll_worker.go b/miner/scroll_worker.go index 08bf4e315033..036718062a3b 100644 --- a/miner/scroll_worker.go +++ b/miner/scroll_worker.go @@ -373,12 +373,12 @@ func (w *worker) startNewPipeline(timestamp int64) { header.Coinbase = w.coinbase } - common.WithTimer(prepareTimer, func() { - if err := w.engine.Prepare(w.chain, header); err != nil { - log.Error("Failed to prepare header for mining", "err", err) - return - } - }) + prepareStart := time.Now() + if err := w.engine.Prepare(w.chain, header); err != nil { + log.Error("Failed to prepare header for mining", "err", err) + return + } + prepareTimer.UpdateSince(prepareStart) // If we are care about TheDAO hard-fork check whether to override the extra-data or not if daoBlock := w.chainConfig.DAOForkBlock; daoBlock != nil {