Make read of ethash hashrate atomic and update ethash godep

This commit is contained in:
Gustav Simonsson
2015-05-14 03:39:07 +02:00
parent f7fdb4dfbe
commit b24f16fa53
5 changed files with 48 additions and 116 deletions

View File

@ -173,7 +173,6 @@ func (self *worker) stop() {
func (self *worker) register(agent Agent) {
self.mu.Lock()
defer self.mu.Unlock()
self.agents = append(self.agents, agent)
agent.SetReturnCh(self.recv)
}
@ -453,13 +452,9 @@ func (self *worker) commitTransaction(tx *types.Transaction) error {
return nil
}
// TODO: remove or use
func (self *worker) HashRate() int64 {
var tot int64
for _, agent := range self.agents {
tot += agent.GetHashRate()
}
return tot
return 0
}
// gasprice calculates a reduced gas price based on the pct