From cd578c7ecf161a589fee66143eaa81ef6c0f6626 Mon Sep 17 00:00:00 2001 From: egon-wm Date: Thu, 24 Apr 2025 14:11:59 +0900 Subject: [PATCH] hotfix: prevent creating blocks with an incorrect coinbase (#156) Bypasses the rules for quick verification. --- miner/worker.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/miner/worker.go b/miner/worker.go index bd49dd676304..b271ea923d68 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -1631,14 +1631,18 @@ func (w *worker) commitWork(interrupt *int32, noempty bool, timestamp int64) { timestamp: uint64(timestamp), coinbase: coinbase, }) + if err != nil { + log.Error("Error in preparing work", "err", err) + return + } if !wemixminer.IsPoW() { // Wemix if coinbase, err := wemixminer.GetCoinbase(work.header.Number); err == nil { work.coinbase = coinbase + } else { + log.Error("Error in getting coinbase", "err", err) + return } } - if err != nil { - return - } if !wemixminer.IsPoW() { // Wemix if !w.commitTransactionsEx(work, interrupt, start) {