diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-12 13:01:18 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-12 13:01:18 +0800 |
commit | 704914be08d0ec6398bd8bec9b1e04103ea0395d (patch) | |
tree | 8b4d1127300217a14ea1f8e9801a223de094c95f /rpc | |
parent | 7ee5cb0a81f9ccc0efec2a5bf830c7566f3289ad (diff) | |
download | dexon-704914be08d0ec6398bd8bec9b1e04103ea0395d.tar.gz dexon-704914be08d0ec6398bd8bec9b1e04103ea0395d.tar.zst dexon-704914be08d0ec6398bd8bec9b1e04103ea0395d.zip |
Check for existance of key before delete
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/api.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rpc/api.go b/rpc/api.go index 90e5dcf37..ba6c54d64 100644 --- a/rpc/api.go +++ b/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 |