Merge pull request #1869 from Gustav-Simonsson/gpu_miner

all: Add GPU mining, disabled by default
This commit is contained in:
Jeffrey Wilcke
2015-10-16 06:25:33 -07:00
42 changed files with 6764 additions and 42 deletions

View File

@ -118,7 +118,7 @@ func (self *CpuAgent) mine(work *Work, stop <-chan struct{}) {
glog.V(logger.Debug).Infof("(re)started agent[%d]. mining...\n", self.index)
// Mine
nonce, mixDigest := self.pow.Search(work.Block, stop)
nonce, mixDigest := self.pow.Search(work.Block, stop, self.index)
if nonce != 0 {
block := work.Block.WithMiningResult(nonce, common.BytesToHash(mixDigest))
self.returnCh <- &Result{work, block}