aboutsummaryrefslogtreecommitdiffstats
path: root/miner/miner.go
diff options
context:
space:
mode:
Diffstat (limited to 'miner/miner.go')
-rw-r--r--miner/miner.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/miner/miner.go b/miner/miner.go
index 769db79d1..6d4a84f1a 100644
--- a/miner/miner.go
+++ b/miner/miner.go
@@ -133,10 +133,13 @@ func (self *Miner) Register(agent Agent) {
if self.Mining() {
agent.Start()
}
-
self.worker.register(agent)
}
+func (self *Miner) Unregister(agent Agent) {
+ self.worker.unregister(agent)
+}
+
func (self *Miner) Mining() bool {
return atomic.LoadInt32(&self.mining) > 0
}
@@ -146,7 +149,7 @@ func (self *Miner) HashRate() (tot int64) {
// do we care this might race? is it worth we're rewriting some
// aspects of the worker/locking up agents so we can get an accurate
// hashrate?
- for _, agent := range self.worker.agents {
+ for agent := range self.worker.agents {
tot += agent.GetHashRate()
}
return