Skip to content

Commit

Permalink
chore: add log
Browse files Browse the repository at this point in the history
  • Loading branch information
irrun committed Jun 5, 2024
1 parent 0939f04 commit 299cbfe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1187,15 +1187,16 @@ func (w *worker) commitWork(interruptCh chan int32, timestamp int64) {
if w.bidder.enabled() {
var err error
// take the next in-turn validator as coinbase
coinbase, err = w.engine.NextInTurnValidator(w.chain, w.chain.CurrentBlock())
currentBlock := w.chain.CurrentBlock()
coinbase, err = w.engine.NextInTurnValidator(w.chain, currentBlock)
if err != nil {
log.Error("Failed to get next in-turn validator", "err", err)
return
}

// do not build work if not register to the coinbase
if !w.bidder.isRegistered(coinbase) {
log.Warn("Refusing to mine with unregistered validator")
log.Warn("Refusing to mine with unregistered validator", "number", currentBlock.Number.Int64(), "coinbase", coinbase)
return
}

Expand Down

0 comments on commit 299cbfe

Please sign in to comment.