Commit 704914be authored by Taylor Gerring's avatar Taylor Gerring

Check for existance of key before delete

parent 7ee5cb0a
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment