Squelch err in case of non-authorized miner

This commit is contained in:
Shane Bammel 2021-10-08 12:44:22 -05:00
parent a0afaf5a08
commit 994eded4c0

View File

@ -925,7 +925,10 @@ func (w *worker) commitNewWork(interrupt *int32, noempty bool, timestamp int64)
header.Coinbase = w.coinbase header.Coinbase = w.coinbase
} }
if err := w.engine.Prepare(w.chain, header); err != nil { if err := w.engine.Prepare(w.chain, header); err != nil {
log.Error("Failed to prepare header for mining", "err", err) // Ignore ErrUnauthorizedValidator, miner.etherbase is not unlocked
if _, ok := err.(*consensus.ErrUnauthorizedValidator); !ok {
log.Error("Failed to prepare header for mining", "err", err)
}
return return
} }
// If we are care about TheDAO hard-fork check whether to override the extra-data or not // If we are care about TheDAO hard-fork check whether to override the extra-data or not