Skip to content

Commit

Permalink
fix: properly handle wrapped retryable errors
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmountaintop committed Sep 17, 2024
1 parent da53690 commit 5dde23e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion miner/scroll_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5dde23e

Please sign in to comment.