mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
fix: avoid committing empty blocks after the deadline (#1051)
This commit is contained in:
parent
d599666894
commit
c0094ee0b4
2 changed files with 2 additions and 2 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue