aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-05 09:28:54 +0800
committerobscuren <geffobscura@gmail.com>2015-02-05 09:28:54 +0800
commit1d519854e2bfe8d5f2e8674f4f04ccf9aeaabe84 (patch)
treee459f8b005415c2f14bb4796b2338c091181c67a /rpc
parent292f7ada8ea4f709ef90b2c20888cdbfbf7b06c6 (diff)
downloadgo-tangerine-1d519854e2bfe8d5f2e8674f4f04ccf9aeaabe84.tar
go-tangerine-1d519854e2bfe8d5f2e8674f4f04ccf9aeaabe84.tar.gz
go-tangerine-1d519854e2bfe8d5f2e8674f4f04ccf9aeaabe84.tar.bz2
go-tangerine-1d519854e2bfe8d5f2e8674f4f04ccf9aeaabe84.tar.lz
go-tangerine-1d519854e2bfe8d5f2e8674f4f04ccf9aeaabe84.tar.xz
go-tangerine-1d519854e2bfe8d5f2e8674f4f04ccf9aeaabe84.tar.zst
go-tangerine-1d519854e2bfe8d5f2e8674f4f04ccf9aeaabe84.zip
Propagate known transactions to new peers on connect
Diffstat (limited to 'rpc')
-rw-r--r--rpc/args.go6
-rw-r--r--rpc/message.go2
-rw-r--r--rpc/packages.go1
3 files changed, 5 insertions, 4 deletions
diff --git a/rpc/args.go b/rpc/args.go
index 75eef873d..34e706b98 100644
--- a/rpc/args.go
+++ b/rpc/args.go
@@ -214,7 +214,7 @@ type FilterOptions struct {
Earliest int64
Latest int64
Address string
- Topics []string
+ Topic []string
Skip int
Max int
}
@@ -224,8 +224,8 @@ func toFilterOptions(options *FilterOptions) core.FilterOptions {
opts.Earliest = options.Earliest
opts.Latest = options.Latest
opts.Address = fromHex(options.Address)
- opts.Topics = make([][]byte, len(options.Topics))
- for i, topic := range options.Topics {
+ opts.Topics = make([][]byte, len(options.Topic))
+ for i, topic := range options.Topic {
opts.Topics[i] = fromHex(topic)
}
diff --git a/rpc/message.go b/rpc/message.go
index f1e982397..0845a2239 100644
--- a/rpc/message.go
+++ b/rpc/message.go
@@ -206,7 +206,7 @@ func (req *RpcRequest) ToFilterArgs() (*FilterOptions, error) {
if len(req.Params) < 1 {
return nil, NewErrorResponse(ErrorArguments)
}
- fmt.Println("filter params", req.Params)
+ fmt.Println("FILTER PARAMS", string(req.Params[0]))
args := new(FilterOptions)
r := bytes.NewReader(req.Params[0])
diff --git a/rpc/packages.go b/rpc/packages.go
index 06de5ca38..a98d99d6c 100644
--- a/rpc/packages.go
+++ b/rpc/packages.go
@@ -70,6 +70,7 @@ func NewEthereumApi(eth *xeth.XEth) *EthereumApi {
func (self *EthereumApi) NewFilter(args *FilterOptions, reply *interface{}) error {
var id int
filter := core.NewFilter(self.xeth.Backend())
+ filter.SetOptions(toFilterOptions(args))
filter.LogsCallback = func(logs state.Logs) {
self.logMut.Lock()
defer self.logMut.Unlock()