mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
fix: do not produce empty blocks when all transactions fail (#235)
This commit is contained in:
parent
15f94b93ea
commit
481ca91e34
1 changed files with 6 additions and 0 deletions
|
|
@ -1038,6 +1038,12 @@ func (w *worker) commitNewWork(interrupt *int32, noempty bool, timestamp int64)
|
|||
return
|
||||
}
|
||||
}
|
||||
|
||||
// do not produce empty blocks
|
||||
if w.current.tcount == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
w.commit(uncles, w.fullTaskHook, true, tstart)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue