aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-15 22:20:50 +0800
committerobscuren <geffobscura@gmail.com>2015-05-16 02:26:15 +0800
commitd3e84cc8b4d995b4cec505b1b183b44d55f61453 (patch)
tree81a2c9bd8de102a8ed8ab922cf23651e0068c048
parent5cec1aad152115502f8ba0d7fcc1c3e40b915d7a (diff)
downloaddexon-d3e84cc8b4d995b4cec505b1b183b44d55f61453.tar.gz
dexon-d3e84cc8b4d995b4cec505b1b183b44d55f61453.tar.zst
dexon-d3e84cc8b4d995b4cec505b1b183b44d55f61453.zip
miner: properly check for mining operation on Register
-rw-r--r--miner/miner.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/miner/miner.go b/miner/miner.go
index 6c220b1a6..19d39a605 100644
--- a/miner/miner.go
+++ b/miner/miner.go
@@ -101,7 +101,7 @@ func (self *Miner) Stop() {
}
func (self *Miner) Register(agent Agent) {
- if atomic.LoadInt32(&self.mining) == 0 {
+ if self.Mining() {
agent.Start()
}