Skip to content

Commit

Permalink
[release/1.4.3] miner: fixed pending state by not shutting down updat…
Browse files Browse the repository at this point in the history
…e loop

(cherry picked from commit a824c3f)
  • Loading branch information
obscuren committed May 10, 2016
1 parent 2a3657d commit 6826b20
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ func newWorker(config *core.ChainConfig, coinbase common.Address, eth core.Backe
fullValidation: false,
}
worker.events = worker.mux.Subscribe(core.ChainHeadEvent{}, core.ChainSideEvent{}, core.TxPreEvent{})
worker.wg.Add(1)
go worker.update()

go worker.wait()
Expand Down Expand Up @@ -188,8 +187,6 @@ func (self *worker) start() {
}

func (self *worker) stop() {
// Quit update.
self.events.Unsubscribe()
self.wg.Wait()

self.mu.Lock()
Expand Down Expand Up @@ -224,7 +221,6 @@ func (self *worker) unregister(agent Agent) {
}

func (self *worker) update() {
defer self.wg.Done()
for event := range self.events.Chan() {
// A real event arrived, process interesting content
switch ev := event.Data.(type) {
Expand Down

0 comments on commit 6826b20

Please sign in to comment.