aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-20 11:03:53 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-20 11:03:53 +0800
commit4663a55f123c3d4886a0537243d1ad86d2a51f21 (patch)
tree31ba477e469b6efbd54cad025e83e9e1eabc6f4b /rpc
parent7c307168282881a440c217cbf06d961f36e954df (diff)
downloadgo-tangerine-4663a55f123c3d4886a0537243d1ad86d2a51f21.tar.gz
go-tangerine-4663a55f123c3d4886a0537243d1ad86d2a51f21.tar.zst
go-tangerine-4663a55f123c3d4886a0537243d1ad86d2a51f21.zip
inline NewFilter
Diffstat (limited to 'rpc')
-rw-r--r--rpc/api.go13
1 files changed, 4 insertions, 9 deletions
diff --git a/rpc/api.go b/rpc/api.go
index 9a994ebbd..495771a59 100644
--- a/rpc/api.go
+++ b/rpc/api.go
@@ -98,14 +98,6 @@ func (self *EthereumApi) getStateWithNum(num int64) *xeth.State {
// return nil
// }
-func (self *EthereumApi) NewFilter(args *FilterOptions, reply *interface{}) error {
- opts := toFilterOptions(args)
- id := self.xeth().RegisterFilter(opts)
- *reply = common.ToHex(big.NewInt(int64(id)).Bytes())
-
- return nil
-}
-
func (self *EthereumApi) UninstallFilter(id int, reply *interface{}) error {
*reply = self.xeth().UninstallFilter(id)
@@ -491,7 +483,10 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error
if err := json.Unmarshal(req.Params, &args); err != nil {
return err
}
- return p.NewFilter(args, reply)
+
+ opts := toFilterOptions(args)
+ id := p.xeth().RegisterFilter(opts)
+ *reply = common.ToHex(big.NewInt(int64(id)).Bytes())
case "eth_newBlockFilter":
args := new(FilterStringArgs)
if err := json.Unmarshal(req.Params, &args); err != nil {