aboutsummaryrefslogtreecommitdiffstats
path: root/miner/agent.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-03-06 02:00:01 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-03-09 22:50:14 +0800
commit567d41d9363706b4b13ce0903804e8acf214af49 (patch)
tree8c091f0385589074573df3f7964c99417c5950ee /miner/agent.go
parent3b00a77de57ab2737a7887521c192ce004c721e3 (diff)
downloadgo-tangerine-567d41d9363706b4b13ce0903804e8acf214af49.tar
go-tangerine-567d41d9363706b4b13ce0903804e8acf214af49.tar.gz
go-tangerine-567d41d9363706b4b13ce0903804e8acf214af49.tar.bz2
go-tangerine-567d41d9363706b4b13ce0903804e8acf214af49.tar.lz
go-tangerine-567d41d9363706b4b13ce0903804e8acf214af49.tar.xz
go-tangerine-567d41d9363706b4b13ce0903804e8acf214af49.tar.zst
go-tangerine-567d41d9363706b4b13ce0903804e8acf214af49.zip
all: swap out the C++ ethash to the pure Go one (mining todo)
Diffstat (limited to 'miner/agent.go')
-rw-r--r--miner/agent.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/miner/agent.go b/miner/agent.go
index 21300b5b9..3c407f20b 100644
--- a/miner/agent.go
+++ b/miner/agent.go
@@ -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())
}