all: swap out the C++ ethash to the pure Go one (mining todo)
This commit is contained in:
committed by
Felix Lange
parent
3b00a77de5
commit
567d41d936
@ -111,7 +111,7 @@ func (self *CpuAgent) mine(work *Work, stop <-chan struct{}) {
|
||||
log.Debug(fmt.Sprintf("(re)started agent[%d]. mining...\n", self.index))
|
||||
|
||||
// Mine
|
||||
nonce, mixDigest := self.pow.Search(work.Block, stop, self.index)
|
||||
nonce, mixDigest := self.pow.Search(work.Block, stop)
|
||||
if nonce != 0 {
|
||||
block := work.Block.WithMiningResult(types.EncodeNonce(nonce), common.BytesToHash(mixDigest))
|
||||
self.returnCh <- &Result{work, block}
|
||||
@ -121,5 +121,5 @@ func (self *CpuAgent) mine(work *Work, stop <-chan struct{}) {
|
||||
}
|
||||
|
||||
func (self *CpuAgent) GetHashRate() int64 {
|
||||
return self.pow.GetHashrate()
|
||||
return int64(self.pow.Hashrate())
|
||||
}
|
||||
|
Reference in New Issue
Block a user