From 8a0f23915e4feb9aabe21bd075416bc0f32bbc43 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 13 Feb 2015 17:23:09 +0100 Subject: 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 --- miner/miner.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'miner/miner.go') 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() } -- cgit