Explorar o código

miner: properly check for mining operation on Register

obscuren %!s(int64=10) %!d(string=hai) anos
pai
achega
d3e84cc8b4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      miner/miner.go

+ 1 - 1
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()
 	}