diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-21 18:00:57 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-21 18:00:57 +0800 |
commit | ed0817c55dc45290d9de594fea28f7bc35d564da (patch) | |
tree | a621db541c431994af026e21f3399869f7b64452 /rpc | |
parent | 093d6d507465263fb9721aa0758b12a31b126c0b (diff) | |
download | go-tangerine-ed0817c55dc45290d9de594fea28f7bc35d564da.tar go-tangerine-ed0817c55dc45290d9de594fea28f7bc35d564da.tar.gz go-tangerine-ed0817c55dc45290d9de594fea28f7bc35d564da.tar.bz2 go-tangerine-ed0817c55dc45290d9de594fea28f7bc35d564da.tar.lz go-tangerine-ed0817c55dc45290d9de594fea28f7bc35d564da.tar.xz go-tangerine-ed0817c55dc45290d9de594fea28f7bc35d564da.tar.zst go-tangerine-ed0817c55dc45290d9de594fea28f7bc35d564da.zip |
core/rpc: fix for null entries in log filters. Closes #725
You can now specify `null` as a way of saying "not interested in this
topic, match all". core.Filter assumes the zero'd address to be the
wildcard. JSON rpc assumes empty strings to be wildcards.
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/args.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rpc/args.go b/rpc/args.go index 4b3840285..d03f914a7 100644 --- a/rpc/args.go +++ b/rpc/args.go @@ -739,10 +739,14 @@ func (args *BlockFilterArgs) UnmarshalJSON(b []byte) (err error) { for j, jv := range argarray { if v, ok := jv.(string); ok { topicdbl[i][j] = v + } else if jv == nil { + topicdbl[i][j] = "" } else { return NewInvalidTypeError(fmt.Sprintf("topic[%d][%d]", i, j), "is not a string") } } + } else if iv == nil { + topicdbl[i] = []string{""} } else { return NewInvalidTypeError(fmt.Sprintf("topic[%d]", i), "not a string or array") } |