From c0d290821e43ba2aa3e0af0f92f79475a5990ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Irmak?= Date: Fri, 20 Sep 2024 14:59:23 +0300 Subject: [PATCH] fix: avoid committing empty blocks after the deadline (#1051) --- miner/scroll_worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miner/scroll_worker.go b/miner/scroll_worker.go index e63640200139..40b7e3d53571 100644 --- a/miner/scroll_worker.go +++ b/miner/scroll_worker.go @@ -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() } }