Skip to content

Commit

Permalink
fix: initialize pending block with an empty block (#1052)
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfirmak authored and 0xmountaintop committed Oct 10, 2024
1 parent c0d2908 commit f957d4d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions miner/scroll_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,10 @@ func (w *worker) newWork(now time.Time, parentHash common.Hash, reorging bool, r
reorging: reorging,
reorgReason: reorgReason,
}

// initiliaze pending block with an empty block to make sure we always have
// a pending block to serve RPC requests
w.updateSnapshot()
return nil
}

Expand Down

0 comments on commit f957d4d

Please sign in to comment.