Skip to content

Commit 7f7877a

Browse files
authored
miner: update pending block even after the PoS transition (ethereum#24075)
1 parent d785905 commit 7f7877a

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

miner/worker.go

+5-7
Original file line numberDiff line numberDiff line change
@@ -1039,17 +1039,15 @@ func (w *worker) commit(uncles []*types.Header, interval func(), update bool, st
10391039
if err != nil {
10401040
return err
10411041
}
1042-
1043-
// If we're post merge, just ignore
1044-
td, ttd := w.chain.GetTd(block.ParentHash(), block.NumberU64()-1), w.chain.Config().TerminalTotalDifficulty
1045-
if td != nil && ttd != nil && td.Cmp(ttd) >= 0 {
1046-
return nil
1047-
}
1048-
10491042
if w.isRunning() {
10501043
if interval != nil {
10511044
interval()
10521045
}
1046+
// If we're post merge, just ignore
1047+
td, ttd := w.chain.GetTd(block.ParentHash(), block.NumberU64()-1), w.chain.Config().TerminalTotalDifficulty
1048+
if td != nil && ttd != nil && td.Cmp(ttd) >= 0 {
1049+
return nil
1050+
}
10531051
select {
10541052
case w.taskCh <- &task{receipts: receipts, state: s, block: block, createdAt: time.Now()}:
10551053
w.unconfirmed.Shift(block.NumberU64() - 1)

0 commit comments

Comments
 (0)