From 6e0d7232273b4dc187dab43543daed0b0335a311 Mon Sep 17 00:00:00 2001 From: SHIVAM SHARMA Date: Thu, 4 May 2023 15:33:11 +0530 Subject: [PATCH] rm : remove interruptctx from txsCh select case (#846) * rm : remove interruptctx from txsCh select case * lint : fix lint --- miner/worker.go | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/miner/worker.go b/miner/worker.go index f79657c580..1666987381 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -674,30 +674,14 @@ func (w *worker) mainLoop(ctx context.Context) { txset := types.NewTransactionsByPriceAndNonce(w.current.signer, txs, cmath.FromBig(w.current.header.BaseFee)) tcount := w.current.tcount - // nolint : contextcheck - var interruptCtx = context.Background() - - stopFn := func() {} - - defer func() { - stopFn() - }() - - if w.interruptCommitFlag { - interruptCtx, stopFn = getInterruptTimer(ctx, w.current, w.chain.CurrentBlock()) - // nolint : staticcheck - interruptCtx = vm.PutCache(interruptCtx, w.interruptedTxCache) - } - - w.commitTransactions(w.current, txset, nil, interruptCtx) + //nolint:contextcheck + w.commitTransactions(w.current, txset, nil, context.Background()) // Only update the snapshot if any new transactions were added // to the pending block if tcount != w.current.tcount { w.updateSnapshot(w.current) } - - stopFn() } else { // Special case, if the consensus engine is 0 period clique(dev mode), // submit sealing work here since all empty submission will be rejected