fix: do not produce empty blocks when all transactions fail (#235)

This commit is contained in:
Péter Garamvölgyi 2023-02-28 09:08:41 +01:00 committed by GitHub
parent 15f94b93ea
commit 481ca91e34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
}