diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-12 04:49:21 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-12 04:49:21 +0800 |
commit | 70f6f2af07b3f3a4d848190525e50f3327acb2c7 (patch) | |
tree | 8c0078e337bbb16299125f6b0cb96e9ad289f49a | |
parent | c2181fdbf2c17d404c2fd28e9568aadc3fba6379 (diff) | |
download | dexon-70f6f2af07b3f3a4d848190525e50f3327acb2c7.tar.gz dexon-70f6f2af07b3f3a4d848190525e50f3327acb2c7.tar.zst dexon-70f6f2af07b3f3a4d848190525e50f3327acb2c7.zip |
shh_uninstallFilter
-rw-r--r-- | rpc/api.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/rpc/api.go b/rpc/api.go index 8bbe80bd8..90e5dcf37 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -381,6 +381,12 @@ func (p *EthereumApi) NewWhisperFilter(args *WhisperFilterArgs, reply *interface return nil } +func (p *EthereumApi) UninstallWhisperFilter(id int, reply *interface{}) error { + delete(p.messages, id) + *reply = true + return nil +} + func (self *EthereumApi) MessagesChanged(id int, reply *interface{}) error { self.messagesMut.Lock() defer self.messagesMut.Unlock() @@ -733,7 +739,11 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error } return p.NewWhisperFilter(args, reply) case "shh_uninstallFilter": - return errNotImplemented + args := new(FilterIdArgs) + if err := json.Unmarshal(req.Params, &args); err != nil { + return err + } + return p.UninstallWhisperFilter(args.Id, reply) case "shh_getFilterChanges": args := new(FilterIdArgs) if err := json.Unmarshal(req.Params, &args); err != nil { |