Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Commit 7b27479

Browse files
committed
miner/worker: skip the uncle logic in Consortium
In Consortium consensus engine, we don't handle uncle blocks. Furthermore, the uncle logic in worker may block the main creating block logic. So this commit skips the uncle logic when Consortium consensus engine is used.
1 parent 12a4522 commit 7b27479

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

miner/worker.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,10 @@ func (w *worker) mainLoop() {
513513
w.commitNewWork(req.interrupt, req.noempty, req.timestamp)
514514

515515
case ev := <-w.chainSideCh:
516+
// Don't handle uncle logic in Consortium
517+
if w.chainConfig.Consortium != nil {
518+
continue
519+
}
516520
// Short circuit for duplicate side blocks
517521
if _, exist := w.localUncles[ev.Block.Hash()]; exist {
518522
continue

0 commit comments

Comments
 (0)