Skip to content

Commit 6826b20

Browse files
committed
[release/1.4.3] miner: fixed pending state by not shutting down update loop
(cherry picked from commit a824c3f)
1 parent 2a3657d commit 6826b20

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

miner/worker.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ func newWorker(config *core.ChainConfig, coinbase common.Address, eth core.Backe
145145
fullValidation: false,
146146
}
147147
worker.events = worker.mux.Subscribe(core.ChainHeadEvent{}, core.ChainSideEvent{}, core.TxPreEvent{})
148-
worker.wg.Add(1)
149148
go worker.update()
150149

151150
go worker.wait()
@@ -188,8 +187,6 @@ func (self *worker) start() {
188187
}
189188

190189
func (self *worker) stop() {
191-
// Quit update.
192-
self.events.Unsubscribe()
193190
self.wg.Wait()
194191

195192
self.mu.Lock()
@@ -224,7 +221,6 @@ func (self *worker) unregister(agent Agent) {
224221
}
225222

226223
func (self *worker) update() {
227-
defer self.wg.Done()
228224
for event := range self.events.Chan() {
229225
// A real event arrived, process interesting content
230226
switch ev := event.Data.(type) {

0 commit comments

Comments
 (0)