diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-22 20:27:03 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-22 20:27:03 +0800 |
commit | 1be7e5048c7fd129ef176f38b0c372a178efadbe (patch) | |
tree | 041b8f74bdcd290268a6b800e5fced2c20c98d88 /rpc/packages.go | |
parent | bba7ccb07f08e0c6ad404abfb363deaec1db5fab (diff) | |
parent | 321dce1f47135f673730cb86fdf1faf03dc6cbd4 (diff) | |
download | dexon-1be7e5048c7fd129ef176f38b0c372a178efadbe.tar dexon-1be7e5048c7fd129ef176f38b0c372a178efadbe.tar.gz dexon-1be7e5048c7fd129ef176f38b0c372a178efadbe.tar.bz2 dexon-1be7e5048c7fd129ef176f38b0c372a178efadbe.tar.lz dexon-1be7e5048c7fd129ef176f38b0c372a178efadbe.tar.xz dexon-1be7e5048c7fd129ef176f38b0c372a178efadbe.tar.zst dexon-1be7e5048c7fd129ef176f38b0c372a178efadbe.zip |
Merge branch 'release/0.8.5' into develop
Diffstat (limited to 'rpc/packages.go')
-rw-r--r-- | rpc/packages.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/rpc/packages.go b/rpc/packages.go index aed43cae2..b51bde7ce 100644 --- a/rpc/packages.go +++ b/rpc/packages.go @@ -167,6 +167,15 @@ func (self *EthereumApi) Logs(id int, reply *interface{}) error { return nil } +func (self *EthereumApi) AllLogs(args *FilterOptions, reply *interface{}) error { + filter := core.NewFilter(self.xeth.Backend()) + filter.SetOptions(toFilterOptions(args)) + + *reply = toLogs(filter.Find()) + + return nil +} + func (p *EthereumApi) GetBlock(args *GetBlockArgs, reply *interface{}) error { err := args.requirements() if err != nil { @@ -509,6 +518,12 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error return err } return p.Logs(args, reply) + case "eth_logs": + args, err := req.ToFilterArgs() + if err != nil { + return err + } + return p.AllLogs(args, reply) case "eth_gasPrice": *reply = defaultGasPrice return nil |