Change the judgment into if :P

I move "err := self.makeCurrent(parent, header)" into if
because when i make geth on Ubuntu. Sometime it will happen the following mistake T_T

miner/worker.go:420:6: no new variables on left side of :=
This commit is contained in:
stormpang 2018-08-13 16:07:22 +08:00 committed by GitHub
parent 6d1e292eef
commit 438a3b739a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -417,8 +417,7 @@ func (self *worker) commitNewWork() {
} }
} }
// Could potentially happen if starting to mine in an odd state. // Could potentially happen if starting to mine in an odd state.
err := self.makeCurrent(parent, header) if err := self.makeCurrent(parent, header); err != nil {
if err != nil {
log.Error("Failed to create mining context", "err", err) log.Error("Failed to create mining context", "err", err)
return return
} }