aboutsummaryrefslogtreecommitdiffstats
path: root/ethminer/miner.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-08-22 02:13:26 +0800
committerobscuren <geffobscura@gmail.com>2014-08-22 02:13:26 +0800
commit732573ba512aa215e88aed3f20393c3c42c1aeb0 (patch)
treef568ee70952f740a380384afb3ccf2d75a2bddb6 /ethminer/miner.go
parent854d6d4e5cb8783e18397fef655ad79065263cc2 (diff)
downloaddexon-732573ba512aa215e88aed3f20393c3c42c1aeb0.tar
dexon-732573ba512aa215e88aed3f20393c3c42c1aeb0.tar.gz
dexon-732573ba512aa215e88aed3f20393c3c42c1aeb0.tar.bz2
dexon-732573ba512aa215e88aed3f20393c3c42c1aeb0.tar.lz
dexon-732573ba512aa215e88aed3f20393c3c42c1aeb0.tar.xz
dexon-732573ba512aa215e88aed3f20393c3c42c1aeb0.tar.zst
dexon-732573ba512aa215e88aed3f20393c3c42c1aeb0.zip
Turbo mining
Diffstat (limited to 'ethminer/miner.go')
-rw-r--r--ethminer/miner.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/ethminer/miner.go b/ethminer/miner.go
index 74f5bc7af..799db79f1 100644
--- a/ethminer/miner.go
+++ b/ethminer/miner.go
@@ -23,6 +23,8 @@ type Miner struct {
powChan chan []byte
powQuitChan chan ethreact.Event
quitChan chan chan error
+
+ turbo bool
}
func (self *Miner) GetPow() ethchain.PoW {
@@ -39,6 +41,12 @@ func NewDefaultMiner(coinbase []byte, ethereum ethchain.EthManager) *Miner {
return &miner
}
+func (self *Miner) ToggleTurbo() {
+ self.turbo = !self.turbo
+
+ self.pow.Turbo(self.turbo)
+}
+
func (miner *Miner) Start() {
miner.reactChan = make(chan ethreact.Event, 1) // This is the channel that receives 'updates' when ever a new transaction or block comes in
miner.powChan = make(chan []byte, 1) // This is the channel that receives valid sha hashes for a given block