diff options
author | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-05-14 09:39:07 +0800 |
---|---|---|
committer | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-05-14 10:05:49 +0800 |
commit | b24f16fa532483e0714700d687f134fb373f2487 (patch) | |
tree | 2e052986e8d9696d890c9186d494ecfb1157d558 /miner/worker.go | |
parent | f7fdb4dfbe1a0851b6fb2970b0a6b11fd31273d6 (diff) | |
download | dexon-b24f16fa532483e0714700d687f134fb373f2487.tar.gz dexon-b24f16fa532483e0714700d687f134fb373f2487.tar.zst dexon-b24f16fa532483e0714700d687f134fb373f2487.zip |
Make read of ethash hashrate atomic and update ethash godep
Diffstat (limited to 'miner/worker.go')
-rw-r--r-- | miner/worker.go | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/miner/worker.go b/miner/worker.go index f737be507..4316038d2 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -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 |