Turbo mining
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user