Check for existance of key before delete
This commit is contained in:
parent
7ee5cb0a81
commit
704914be08
@ -167,7 +167,10 @@ func (self *EthereumApi) NewFilter(args *FilterOptions, reply *interface{}) erro
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (self *EthereumApi) UninstallFilter(id int, reply *interface{}) error {
|
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)
|
self.filterManager.UninstallFilter(id)
|
||||||
*reply = true
|
*reply = true
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user