Skip to content

Commit

Permalink
miner: sets coinbase just after prepareWork
Browse files Browse the repository at this point in the history
  • Loading branch information
saddoc committed Aug 16, 2023
1 parent 78a59a9 commit aa01c82
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1627,16 +1627,16 @@ func (w *worker) commitWork(interrupt *int32, noempty bool, timestamp int64) {
timestamp: uint64(timestamp),
coinbase: coinbase,
})
if !wemixminer.IsPoW() { // Wemix
if coinbase, err := wemixminer.GetCoinbase(work.header.Number); err == nil {
work.coinbase = coinbase
}
}
if err != nil {
return
}

if !wemixminer.IsPoW() { // Wemix
parent := w.chain.CurrentBlock()
getCoinbase, err := wemixminer.GetCoinbase(parent.Number())
if err == nil {
work.coinbase = getCoinbase
}
if !w.commitTransactionsEx(work, interrupt, start) {
w.commitEx(work, w.fullTaskHook, true, start)
}
Expand Down

0 comments on commit aa01c82

Please sign in to comment.