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
This commit is contained in:
obscuren
2015-02-13 17:23:09 +01:00
parent 8305d409d2
commit 8a0f23915e
5 changed files with 66 additions and 29 deletions

View File

@ -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()
}