From 5dde23e08e919866db90e67eb0509a3044554b7c Mon Sep 17 00:00:00 2001 From: HAOYUatHZ Date: Tue, 17 Sep 2024 15:32:14 +1000 Subject: [PATCH] fix: properly handle wrapped retryable errors --- miner/scroll_worker.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/miner/scroll_worker.go b/miner/scroll_worker.go index d9dbc9f4a5e6..3d01f6e9bf40 100644 --- a/miner/scroll_worker.go +++ b/miner/scroll_worker.go @@ -279,7 +279,8 @@ func (w *worker) mainLoop() { default: } - if _, isRetryable := err.(retryableCommitError); isRetryable { + var retryableCommitError *retryableCommitError + if errors.As(err, &retryableCommitError) { log.Warn("failed to commit to a block, retrying", "err", err) if _, err = w.tryCommitNewWork(time.Now(), w.current.header.ParentHash, w.current.reorgReason); err != nil { continue