core, miner: remove Frontier canary
This commit is contained in:
@ -351,19 +351,15 @@ func (self *worker) wait() {
|
||||
}
|
||||
}
|
||||
|
||||
// push sends a new work task to currently live miner agents.
|
||||
func (self *worker) push(work *Work) {
|
||||
if atomic.LoadInt32(&self.mining) == 1 {
|
||||
if core.Canary(work.state) {
|
||||
glog.Infoln("Toxicity levels rising to deadly levels. Your canary has died. You can go back or continue down the mineshaft --more--")
|
||||
glog.Infoln("You turn back and abort mining")
|
||||
return
|
||||
}
|
||||
// push new work to agents
|
||||
for agent := range self.agents {
|
||||
atomic.AddInt32(&self.atWork, 1)
|
||||
if agent.Work() != nil {
|
||||
agent.Work() <- work
|
||||
}
|
||||
if atomic.LoadInt32(&self.mining) != 1 {
|
||||
return
|
||||
}
|
||||
for agent := range self.agents {
|
||||
atomic.AddInt32(&self.atWork, 1)
|
||||
if ch := agent.Work(); ch != nil {
|
||||
ch <- work
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user