From c0094ee0b43e903ced3de9b7cc61b11ec4bdf774 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 +- params/version.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/miner/scroll_worker.go b/miner/scroll_worker.go index 87edea0498..293c4398f2 100644 --- a/miner/scroll_worker.go +++ b/miner/scroll_worker.go @@ -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() } } diff --git a/params/version.go b/params/version.go index 49ab1dec9e..ec3dfc492e 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 5 // Major version component of the current release VersionMinor = 7 // Minor version component of the current release - VersionPatch = 19 // Patch version component of the current release + VersionPatch = 20 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string )