Skip to content

Commit

Permalink
fix: avoid committing empty blocks after the deadline
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfirmak committed Sep 20, 2024
1 parent d599666 commit fa59551
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 @@ -396,7 +396,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 fa59551

Please sign in to comment.