miner: only fill the pending block pre-merge

This commit is contained in:
Marius van der Wijden 2023-10-31 10:17:11 +01:00
parent 6c6982163b
commit ab0d224c73

View file

@ -1068,6 +1068,8 @@ func (w *worker) commitWork(interrupt *atomic.Int32, timestamp int64) {
if err != nil {
return
}
// Don't fill the pending block post-merge
if !w.chainConfig.TerminalTotalDifficultyPassed {
// Fill pending transactions from the txpool into the block.
err = w.fillTransactions(interrupt, work)
switch {
@ -1097,6 +1099,8 @@ func (w *worker) commitWork(interrupt *atomic.Int32, timestamp int64) {
work.discard()
return
}
}
// Submit the generated block for consensus sealing.
w.commit(work.copy(), w.fullTaskHook, true, start)