aboutsummaryrefslogtreecommitdiffstats
path: root/miner/worker.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2016-05-10 19:35:01 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2016-05-10 19:35:01 +0800
commita824c3f02f74eb11b4382abbb92aa8babc5d685c (patch)
tree36b8d7c9c6cb82fb2656d3f6d8efca216888c7ac /miner/worker.go
parent5782164a35ea8acdb09507a604c45941051fd5f3 (diff)
downloadgo-tangerine-a824c3f02f74eb11b4382abbb92aa8babc5d685c.tar
go-tangerine-a824c3f02f74eb11b4382abbb92aa8babc5d685c.tar.gz
go-tangerine-a824c3f02f74eb11b4382abbb92aa8babc5d685c.tar.bz2
go-tangerine-a824c3f02f74eb11b4382abbb92aa8babc5d685c.tar.lz
go-tangerine-a824c3f02f74eb11b4382abbb92aa8babc5d685c.tar.xz
go-tangerine-a824c3f02f74eb11b4382abbb92aa8babc5d685c.tar.zst
go-tangerine-a824c3f02f74eb11b4382abbb92aa8babc5d685c.zip
miner: fixed pending state by not shutting down update loop
Diffstat (limited to 'miner/worker.go')
-rw-r--r--miner/worker.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/miner/worker.go b/miner/worker.go
index 3d1928bf6..fe759560c 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -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()
@@ -188,8 +187,6 @@ func (self *worker) start() {
}
func (self *worker) stop() {
- // Quit update.
- self.events.Unsubscribe()
self.wg.Wait()
self.mu.Lock()
@@ -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) {