aboutsummaryrefslogtreecommitdiffstats
path: root/miner/miner.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-14 00:23:09 +0800
committerobscuren <geffobscura@gmail.com>2015-02-14 00:23:09 +0800
commit8a0f23915e4feb9aabe21bd075416bc0f32bbc43 (patch)
tree8f7dc62676e519236b69a977c7af00d81b1e0406 /miner/miner.go
parent8305d409d2ca83583d9fa7e837ec0a46ce6ba78e (diff)
downloadgo-tangerine-8a0f23915e4feb9aabe21bd075416bc0f32bbc43.tar
go-tangerine-8a0f23915e4feb9aabe21bd075416bc0f32bbc43.tar.gz
go-tangerine-8a0f23915e4feb9aabe21bd075416bc0f32bbc43.tar.bz2
go-tangerine-8a0f23915e4feb9aabe21bd075416bc0f32bbc43.tar.lz
go-tangerine-8a0f23915e4feb9aabe21bd075416bc0f32bbc43.tar.xz
go-tangerine-8a0f23915e4feb9aabe21bd075416bc0f32bbc43.tar.zst
go-tangerine-8a0f23915e4feb9aabe21bd075416bc0f32bbc43.zip
Fixed a few issues in the miner and updated hash rate title
* Sometimes old nonces were set by "old" agents * Added the hash rate to the miner
Diffstat (limited to 'miner/miner.go')
-rw-r--r--miner/miner.go14
1 files changed, 4 insertions, 10 deletions
diff --git a/miner/miner.go b/miner/miner.go
index f184042dc..e3e7bead2 100644
--- a/miner/miner.go
+++ b/miner/miner.go
@@ -38,22 +38,16 @@ func (self *Miner) Mining() bool {
}
func (self *Miner) Start() {
+ self.mining = true
+
self.worker.start()
self.worker.commitNewWork()
-
- /*
- timer := time.NewTicker(time.Second)
- for {
- select {
- case <-timer.C:
- fmt.Printf("%d workers. %d/Khash\n", len(self.worker.agents), self.HashRate())
- }
- }
- */
}
func (self *Miner) Stop() {
+ self.mining = false
+
self.worker.stop()
}