mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
rm : remove interruptctx from txsCh select case (#846)
* rm : remove interruptctx from txsCh select case * lint : fix lint
This commit is contained in:
parent
5fba09885d
commit
6e0d723227
1 changed files with 2 additions and 18 deletions
|
|
@ -675,29 +675,13 @@ func (w *worker) mainLoop(ctx context.Context) {
|
||||||
tcount := w.current.tcount
|
tcount := w.current.tcount
|
||||||
|
|
||||||
//nolint:contextcheck
|
//nolint:contextcheck
|
||||||
var interruptCtx = context.Background()
|
w.commitTransactions(w.current, txset, nil, 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)
|
|
||||||
|
|
||||||
// Only update the snapshot if any new transactions were added
|
// Only update the snapshot if any new transactions were added
|
||||||
// to the pending block
|
// to the pending block
|
||||||
if tcount != w.current.tcount {
|
if tcount != w.current.tcount {
|
||||||
w.updateSnapshot(w.current)
|
w.updateSnapshot(w.current)
|
||||||
}
|
}
|
||||||
|
|
||||||
stopFn()
|
|
||||||
} else {
|
} else {
|
||||||
// Special case, if the consensus engine is 0 period clique(dev mode),
|
// Special case, if the consensus engine is 0 period clique(dev mode),
|
||||||
// submit sealing work here since all empty submission will be rejected
|
// submit sealing work here since all empty submission will be rejected
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue