aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/packages.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-18 05:46:30 +0800
committerobscuren <geffobscura@gmail.com>2015-02-18 05:46:30 +0800
commit26d58e0446521f725616b5a5d1b9d1ac04837f00 (patch)
tree86e8b22ff5b92064d0bd5d53d9f6a50c489610c2 /rpc/packages.go
parent7fc9b5b3f9ca0111cc4bc1b2a6b4bb2eccd3e048 (diff)
downloadgo-tangerine-26d58e0446521f725616b5a5d1b9d1ac04837f00.tar
go-tangerine-26d58e0446521f725616b5a5d1b9d1ac04837f00.tar.gz
go-tangerine-26d58e0446521f725616b5a5d1b9d1ac04837f00.tar.bz2
go-tangerine-26d58e0446521f725616b5a5d1b9d1ac04837f00.tar.lz
go-tangerine-26d58e0446521f725616b5a5d1b9d1ac04837f00.tar.xz
go-tangerine-26d58e0446521f725616b5a5d1b9d1ac04837f00.tar.zst
go-tangerine-26d58e0446521f725616b5a5d1b9d1ac04837f00.zip
Forgot to add the case for logs. Closes #336
Diffstat (limited to 'rpc/packages.go')
-rw-r--r--rpc/packages.go27
1 files changed, 9 insertions, 18 deletions
diff --git a/rpc/packages.go b/rpc/packages.go
index 4d2194571..8aa604aa5 100644
--- a/rpc/packages.go
+++ b/rpc/packages.go
@@ -1,21 +1,4 @@
/*
- This file is part of go-ethereum
-
- go-ethereum is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- go-ethereum is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
-*/
-/*
-
For each request type, define the following:
1. RpcRequest "To" method [message.go], which does basic validation and conversion to "Args" type via json.Decoder()
@@ -160,7 +143,9 @@ func (self *EthereumApi) Logs(id int, reply *interface{}) error {
defer self.logMut.Unlock()
filter := self.filterManager.GetFilter(id)
- *reply = toLogs(filter.Find())
+ if filter != nil {
+ *reply = toLogs(filter.Find())
+ }
return nil
}
@@ -465,6 +450,12 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error
return err
}
return p.FilterChanged(args, reply)
+ case "eth_filterLogs":
+ args, err := req.ToFilterChangedArgs()
+ if err != nil {
+ return err
+ }
+ return p.Logs(args, reply)
case "eth_gasPrice":
*reply = defaultGasPrice
return nil