diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-20 11:11:52 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-20 11:11:52 +0800 |
commit | 1f9b93647be5badfec854210b6c2b036d8c9aa6c (patch) | |
tree | 9bd3a8aaa0302fa1b1da146019348522656d55b4 /rpc/api.go | |
parent | 4b5e5926560df601e3055f3cfbf120ff2f4a49cc (diff) | |
download | go-tangerine-1f9b93647be5badfec854210b6c2b036d8c9aa6c.tar go-tangerine-1f9b93647be5badfec854210b6c2b036d8c9aa6c.tar.gz go-tangerine-1f9b93647be5badfec854210b6c2b036d8c9aa6c.tar.bz2 go-tangerine-1f9b93647be5badfec854210b6c2b036d8c9aa6c.tar.lz go-tangerine-1f9b93647be5badfec854210b6c2b036d8c9aa6c.tar.xz go-tangerine-1f9b93647be5badfec854210b6c2b036d8c9aa6c.tar.zst go-tangerine-1f9b93647be5badfec854210b6c2b036d8c9aa6c.zip |
inline NewWhisperFilter
Diffstat (limited to 'rpc/api.go')
-rw-r--r-- | rpc/api.go | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/rpc/api.go b/rpc/api.go index ff2ae6c34..15a9f8b1f 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -175,16 +175,6 @@ func (p *EthereumApi) GetStorageAt(args *GetStorageAtArgs, reply *interface{}) e return nil } -func (p *EthereumApi) NewWhisperFilter(args *WhisperFilterArgs, reply *interface{}) error { - opts := new(xeth.Options) - opts.From = args.From - opts.To = args.To - opts.Topics = args.Topics - id := p.xeth().NewWhisperFilter(opts) - *reply = common.ToHex(big.NewInt(int64(id)).Bytes()) - return nil -} - func (p *EthereumApi) UninstallWhisperFilter(id int, reply *interface{}) error { *reply = p.xeth().UninstallWhisperFilter(id) return nil @@ -550,7 +540,12 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error if err := json.Unmarshal(req.Params, &args); err != nil { return err } - return p.NewWhisperFilter(args, reply) + opts := new(xeth.Options) + opts.From = args.From + opts.To = args.To + opts.Topics = args.Topics + id := p.xeth().NewWhisperFilter(opts) + *reply = common.ToHex(big.NewInt(int64(id)).Bytes()) case "shh_uninstallFilter": args := new(FilterIdArgs) if err := json.Unmarshal(req.Params, &args); err != nil { |