aboutsummaryrefslogtreecommitdiffstats
path: root/ethminer/miner.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-30 22:58:31 +0800
committerobscuren <geffobscura@gmail.com>2014-05-30 22:58:31 +0800
commit6b7dfa1fb5279407177fb9fb6574ad9760a4e307 (patch)
tree7c8aca5aaf4355256bf245543842065073e56771 /ethminer/miner.go
parent2ef3a989298aa8dca7872be07ad0abbc32728cc7 (diff)
parent17c825f53a2676ffe17fd7731f8f550aebcb56b0 (diff)
downloaddexon-6b7dfa1fb5279407177fb9fb6574ad9760a4e307.tar
dexon-6b7dfa1fb5279407177fb9fb6574ad9760a4e307.tar.gz
dexon-6b7dfa1fb5279407177fb9fb6574ad9760a4e307.tar.bz2
dexon-6b7dfa1fb5279407177fb9fb6574ad9760a4e307.tar.lz
dexon-6b7dfa1fb5279407177fb9fb6574ad9760a4e307.tar.xz
dexon-6b7dfa1fb5279407177fb9fb6574ad9760a4e307.tar.zst
dexon-6b7dfa1fb5279407177fb9fb6574ad9760a4e307.zip
Merge branch 'develop'
Diffstat (limited to 'ethminer/miner.go')
-rw-r--r--ethminer/miner.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/ethminer/miner.go b/ethminer/miner.go
index 9396d33f9..19ff5dd9e 100644
--- a/ethminer/miner.go
+++ b/ethminer/miner.go
@@ -25,6 +25,7 @@ func NewDefaultMiner(coinbase []byte, ethereum ethchain.EthManager) Miner {
reactChan := make(chan ethutil.React, 1) // This is the channel that receives 'updates' when ever a new transaction or block comes in
powChan := make(chan []byte, 1) // This is the channel that receives valid sha hases for a given block
powQuitChan := make(chan ethutil.React, 1) // This is the channel that can exit the miner thread
+ quitChan := make(chan bool, 1)
ethereum.Reactor().Subscribe("newBlock", reactChan)
ethereum.Reactor().Subscribe("newTx:pre", reactChan)
@@ -44,7 +45,7 @@ func NewDefaultMiner(coinbase []byte, ethereum ethchain.EthManager) Miner {
reactChan: reactChan,
powChan: powChan,
powQuitChan: powQuitChan,
- quitChan: make(chan bool),
+ quitChan: quitChan,
}
// Insert initial TXs in our little miner 'pool'
@@ -148,7 +149,7 @@ func (self *Miner) mineNewBlock() {
// Find a valid nonce
self.block.Nonce = self.pow.Search(self.block, self.powQuitChan)
if self.block.Nonce != nil {
- err := self.ethereum.StateManager().Process(self.block, true)
+ err := self.ethereum.StateManager().Process(self.block, false)
if err != nil {
ethutil.Config.Log.Infoln(err)
} else {