diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-02-19 20:21:37 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-02-19 20:21:37 +0800 |
commit | dba4f3122e83a66edc1fa089c5d69f789b07a6b3 (patch) | |
tree | c6535465b0c6039d278e8ed13c27510b397eea3a /rpc/packages.go | |
parent | fdecc11128596eadc00e7a7d81b856d844396c37 (diff) | |
download | dexon-dba4f3122e83a66edc1fa089c5d69f789b07a6b3.tar dexon-dba4f3122e83a66edc1fa089c5d69f789b07a6b3.tar.gz dexon-dba4f3122e83a66edc1fa089c5d69f789b07a6b3.tar.bz2 dexon-dba4f3122e83a66edc1fa089c5d69f789b07a6b3.tar.lz dexon-dba4f3122e83a66edc1fa089c5d69f789b07a6b3.tar.xz dexon-dba4f3122e83a66edc1fa089c5d69f789b07a6b3.tar.zst dexon-dba4f3122e83a66edc1fa089c5d69f789b07a6b3.zip |
Added uninstall filter methods
Diffstat (limited to 'rpc/packages.go')
-rw-r--r-- | rpc/packages.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rpc/packages.go b/rpc/packages.go index 8aa604aa5..216321dba 100644 --- a/rpc/packages.go +++ b/rpc/packages.go @@ -105,6 +105,13 @@ func (self *EthereumApi) NewFilter(args *FilterOptions, reply *interface{}) erro return nil } +func (self *EthereumApi) UninstallFilter(id int, reply *interface{}) error { + delete(self.logs, id) + self.filterManager.UninstallFilter(id) + *reply = true + return nil +} + func (self *EthereumApi) NewFilterString(args string, reply *interface{}) error { var id int filter := core.NewFilter(self.xeth.Backend()) @@ -444,6 +451,12 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error return err } return p.NewFilterString(args, reply) + case "eth_uninstallFilter": + args, err := req.ToUninstallFilterArgs() + if err != nil { + return err + } + return p.UninstallFilter(args, reply) case "eth_changed": args, err := req.ToFilterChangedArgs() if err != nil { |