aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-20 11:06:32 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-20 11:06:32 +0800
commit3e9632e2566d9853e4c12ccd545e818df290219b (patch)
tree2a20100f363cc3f71e46009a0d2cbd9810c27cdc
parent84b19971fadaae6d4b77667327d967f62d8726f8 (diff)
downloadgo-tangerine-3e9632e2566d9853e4c12ccd545e818df290219b.tar.gz
go-tangerine-3e9632e2566d9853e4c12ccd545e818df290219b.tar.zst
go-tangerine-3e9632e2566d9853e4c12ccd545e818df290219b.zip
inline NewFilterString
-rw-r--r--rpc/api.go17
1 files changed, 6 insertions, 11 deletions
diff --git a/rpc/api.go b/rpc/api.go
index 2dd171a65..39137d8db 100644
--- a/rpc/api.go
+++ b/rpc/api.go
@@ -98,16 +98,6 @@ func (self *EthereumApi) getStateWithNum(num int64) *xeth.State {
// return nil
// }
-func (self *EthereumApi) NewFilterString(args *FilterStringArgs, reply *interface{}) error {
- if err := args.requirements(); err != nil {
- return err
- }
-
- id := self.xeth().NewFilterString(args.Word)
- *reply = common.ToHex(big.NewInt(int64(id)).Bytes())
- return nil
-}
-
func (self *EthereumApi) FilterChanged(id int, reply *interface{}) error {
*reply = NewLogsRes(self.xeth().FilterChanged(id))
return nil
@@ -486,7 +476,12 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error
if err := json.Unmarshal(req.Params, &args); err != nil {
return err
}
- return p.NewFilterString(args, reply)
+ if err := args.requirements(); err != nil {
+ return err
+ }
+
+ id := p.xeth().NewFilterString(args.Word)
+ *reply = common.ToHex(big.NewInt(int64(id)).Bytes())
case "eth_uninstallFilter":
args := new(FilterIdArgs)
if err := json.Unmarshal(req.Params, &args); err != nil {