diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-15 23:04:22 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-15 23:04:22 +0800 |
commit | ec6cbb914b4e3070ad2fd6194c2fa6de2c1080cc (patch) | |
tree | bd82a68906e953d3b223724bc2537b39866a03fb /miner/miner.go | |
parent | 52c874a6098d52cc369a982dfd2c88f244a0e3f2 (diff) | |
download | dexon-ec6cbb914b4e3070ad2fd6194c2fa6de2c1080cc.tar.gz dexon-ec6cbb914b4e3070ad2fd6194c2fa6de2c1080cc.tar.zst dexon-ec6cbb914b4e3070ad2fd6194c2fa6de2c1080cc.zip |
miner: start a newly registered agent if the miner is running. Closes #681
Diffstat (limited to 'miner/miner.go')
-rw-r--r-- | miner/miner.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/miner/miner.go b/miner/miner.go index aa6c059ba..a14a195d2 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -48,14 +48,16 @@ func (self *Miner) Start(coinbase common.Address) { } func (self *Miner) Register(agent Agent) { + if self.mining { + agent.Start() + } + self.worker.register(agent) } func (self *Miner) Stop() { self.mining = false self.worker.stop() - - //self.pow.(*ethash.Ethash).Stop() } func (self *Miner) HashRate() int64 { |