mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-16 04:56:36 +00:00
miner: properly check for mining operation on Register
This commit is contained in:
parent
5cec1aad15
commit
d3e84cc8b4
1 changed files with 1 additions and 1 deletions
|
|
@ -101,7 +101,7 @@ func (self *Miner) Stop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *Miner) Register(agent Agent) {
|
func (self *Miner) Register(agent Agent) {
|
||||||
if atomic.LoadInt32(&self.mining) == 0 {
|
if self.Mining() {
|
||||||
agent.Start()
|
agent.Start()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue