aboutsummaryrefslogtreecommitdiffstats
path: root/miner/worker.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-15 23:04:22 +0800
committerobscuren <geffobscura@gmail.com>2015-04-15 23:04:22 +0800
commitec6cbb914b4e3070ad2fd6194c2fa6de2c1080cc (patch)
treebd82a68906e953d3b223724bc2537b39866a03fb /miner/worker.go
parent52c874a6098d52cc369a982dfd2c88f244a0e3f2 (diff)
downloaddexon-ec6cbb914b4e3070ad2fd6194c2fa6de2c1080cc.tar
dexon-ec6cbb914b4e3070ad2fd6194c2fa6de2c1080cc.tar.gz
dexon-ec6cbb914b4e3070ad2fd6194c2fa6de2c1080cc.tar.bz2
dexon-ec6cbb914b4e3070ad2fd6194c2fa6de2c1080cc.tar.lz
dexon-ec6cbb914b4e3070ad2fd6194c2fa6de2c1080cc.tar.xz
dexon-ec6cbb914b4e3070ad2fd6194c2fa6de2c1080cc.tar.zst
dexon-ec6cbb914b4e3070ad2fd6194c2fa6de2c1080cc.zip
miner: start a newly registered agent if the miner is running. Closes #681
Diffstat (limited to 'miner/worker.go')
-rw-r--r--miner/worker.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/miner/worker.go b/miner/worker.go
index 916481973..9fb248efa 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -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))
+ }
}
}
}