Skip to content

Commit d9aad44

Browse files
authored
hotfix: prevent creating blocks with an incorrect coinbase (#156) to devnet (#157)
Bypasses the rules for quick verification.
1 parent cea2550 commit d9aad44

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

miner/worker.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,14 +1631,18 @@ func (w *worker) commitWork(interrupt *int32, noempty bool, timestamp int64) {
16311631
timestamp: uint64(timestamp),
16321632
coinbase: coinbase,
16331633
})
1634+
if err != nil {
1635+
log.Error("Error in preparing work", "err", err)
1636+
return
1637+
}
16341638
if !wemixminer.IsPoW() { // Wemix
16351639
if coinbase, err := wemixminer.GetCoinbase(work.header.Number); err == nil {
16361640
work.coinbase = coinbase
1641+
} else {
1642+
log.Error("Error in getting coinbase", "err", err)
1643+
return
16371644
}
16381645
}
1639-
if err != nil {
1640-
return
1641-
}
16421646

16431647
if !wemixminer.IsPoW() { // Wemix
16441648
if !w.commitTransactionsEx(work, interrupt, start) {

0 commit comments

Comments
 (0)