miner: start a newly registered agent if the miner is running. Closes #681

This commit is contained in:
obscuren
2015-04-15 17:04:22 +02:00
parent 52c874a609
commit ec6cbb914b
2 changed files with 9 additions and 3 deletions

View File

@ -225,7 +225,11 @@ func (self *worker) push() {
for _, agent := range self.agents {
atomic.AddInt64(&self.atWork, 1)
agent.Work() <- self.current.block.Copy()
if agent.Work() != nil {
agent.Work() <- self.current.block.Copy()
} else {
common.Report(fmt.Sprintf("%v %T\n", agent, agent))
}
}
}
}