From 474e418e51270c81d61adce8f76a092d6d912948 Mon Sep 17 00:00:00 2001 From: meows Date: Mon, 6 Feb 2023 11:33:32 -0800 Subject: [PATCH] Revert "core: maybe fix panic" This reverts commit 83fb902128c1d88b745450f4d90cb0d77e90a034. --- core/tx_cacher.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/core/tx_cacher.go b/core/tx_cacher.go index 95c025810a..b1e5d676a2 100644 --- a/core/tx_cacher.go +++ b/core/tx_cacher.go @@ -60,16 +60,9 @@ func newTxSenderCacher(threads int) *txSenderCacher { // cache is an infinite loop, caching transaction senders from various forms of // data structures. func (cacher *txSenderCacher) cache() { - for { - select { - case task := <-cacher.tasks: - for i := 0; i < len(task.txs); i += task.inc { - types.Sender(task.signer, task.txs[i]) - } - default: - if cacher.tasks == nil { - return - } + for task := range cacher.tasks { + for i := 0; i < len(task.txs); i += task.inc { + types.Sender(task.signer, task.txs[i]) } } }