mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-15 04:26:37 +00:00
Check for existance of key before delete
This commit is contained in:
parent
7ee5cb0a81
commit
704914be08
1 changed files with 4 additions and 1 deletions
|
|
@ -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 a new issue