aboutsummaryrefslogtreecommitdiffstats
path: root/miner/miner.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-06 17:22:40 +0800
committerobscuren <geffobscura@gmail.com>2015-03-06 17:22:40 +0800
commit23ad2f02c0992c212d7d179991560eb44f1b1f78 (patch)
tree534c2139cb72e37852f5fc20be15ccd5367e7a32 /miner/miner.go
parent580d09084d85c3c99a1f69fd4fc6ce9079e30065 (diff)
downloadgo-tangerine-23ad2f02c0992c212d7d179991560eb44f1b1f78.tar.gz
go-tangerine-23ad2f02c0992c212d7d179991560eb44f1b1f78.tar.zst
go-tangerine-23ad2f02c0992c212d7d179991560eb44f1b1f78.zip
debug comments & pow handling
Diffstat (limited to 'miner/miner.go')
-rw-r--r--miner/miner.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/miner/miner.go b/miner/miner.go
index b95c65859..490296431 100644
--- a/miner/miner.go
+++ b/miner/miner.go
@@ -3,6 +3,7 @@ package miner
import (
"math/big"
+ "github.com/ethereum/ethash"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/pow"
@@ -29,7 +30,6 @@ func New(coinbase []byte, eth core.Backend, pow pow.PoW, minerThreads int) *Mine
pow: pow,
}
- minerThreads = 1
for i := 0; i < minerThreads; i++ {
miner.worker.register(NewCpuMiner(i, miner.pow))
}
@@ -44,6 +44,8 @@ func (self *Miner) Mining() bool {
func (self *Miner) Start() {
self.mining = true
+ self.pow.(*ethash.Ethash).UpdateDAG()
+
self.worker.start()
self.worker.commitNewWork()
@@ -53,6 +55,8 @@ func (self *Miner) Stop() {
self.mining = false
self.worker.stop()
+
+ //self.pow.(*ethash.Ethash).Stop()
}
func (self *Miner) HashRate() int64 {