aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/chain_manager.go4
-rw-r--r--rpc/packages.go6
2 files changed, 3 insertions, 7 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go
index 47cad825d..600dc3db5 100644
--- a/core/chain_manager.go
+++ b/core/chain_manager.go
@@ -396,9 +396,7 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error {
self.mu.Unlock()
if chain {
- fmt.Println("POST START")
- self.eventMux.Post(ChainEvent{block, td})
- fmt.Println("POST END")
+ go self.eventMux.Post(ChainEvent{block, td})
}
if split {
diff --git a/rpc/packages.go b/rpc/packages.go
index 56c1751d7..72e090130 100644
--- a/rpc/packages.go
+++ b/rpc/packages.go
@@ -101,13 +101,11 @@ func (self *EthereumApi) NewFilter(args *FilterOptions, reply *interface{}) erro
self.logMut.Lock()
defer self.logMut.Unlock()
- if self.logs[id] == nil {
- self.logs[id] = &logFilter{timeout: time.Now()}
- }
-
self.logs[id].add(logs...)
}
id = self.filterManager.InstallFilter(filter)
+ self.logs[id] = &logFilter{timeout: time.Now()}
+
*reply = id
return nil