Skip to content

Commit

Permalink
fix: avoid committing empty blocks after the deadline (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfirmak authored and 0xmountaintop committed Oct 10, 2024
1 parent 72bf841 commit c0d2908
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miner/scroll_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func (w *worker) mainLoop() {
// be automatically eliminated.
if w.current != nil {
shouldCommit, _ := w.processTxnSlice(ev.Txs)
if shouldCommit || w.current.deadlineReached {
if shouldCommit || (w.current.deadlineReached && len(w.current.txs) > 0) {
_, err = w.commit()
}
}
Expand Down

0 comments on commit c0d2908

Please sign in to comment.