Check for existance of key before delete

release/1.0.1
Taylor Gerring 10 years ago
parent 7ee5cb0a81
commit 704914be08
  1. 5
      rpc/api.go

@ -167,7 +167,10 @@ func (self *EthereumApi) NewFilter(args *FilterOptions, reply *interface{}) erro
}
func (self *EthereumApi) UninstallFilter(id int, reply *interface{}) error {
delete(self.logs, id)
if _, ok := self.logs[id]; ok {
delete(self.logs, id)
}
self.filterManager.UninstallFilter(id)
*reply = true
return nil

Loading…
Cancel
Save