mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
miner: avoid transaction processing when pending block is already full
This commit is contained in:
parent
6fffb61bc1
commit
dbdd485a3a
1 changed files with 4 additions and 0 deletions
|
|
@ -453,6 +453,10 @@ func (w *worker) mainLoop() {
|
|||
// already included in the current mining block. These transactions will
|
||||
// be automatically eliminated.
|
||||
if !w.isRunning() && w.current != nil {
|
||||
// If block is already full, abort
|
||||
if gp := w.current.gasPool; gp != nil && gp.Gas() < params.TxGas {
|
||||
continue
|
||||
}
|
||||
w.mu.RLock()
|
||||
coinbase := w.coinbase
|
||||
w.mu.RUnlock()
|
||||
|
|
|
|||
Loading…
Reference in a new issue