aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-21 18:00:57 +0800
committerobscuren <geffobscura@gmail.com>2015-04-21 18:00:57 +0800
commited0817c55dc45290d9de594fea28f7bc35d564da (patch)
treea621db541c431994af026e21f3399869f7b64452 /core
parent093d6d507465263fb9721aa0758b12a31b126c0b (diff)
downloadgo-tangerine-ed0817c55dc45290d9de594fea28f7bc35d564da.tar.gz
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 'core')
-rw-r--r--core/filter.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/filter.go b/core/filter.go
index 4508b35b3..a924709f2 100644
--- a/core/filter.go
+++ b/core/filter.go
@@ -134,7 +134,8 @@ Logs:
for i, topics := range self.topics {
for _, topic := range topics {
var match bool
- if log.Topics[i] == topic {
+ // common.Hash{} is a match all (wildcard)
+ if (topic == common.Hash{}) || log.Topics[i] == topic {
match = true
}
if !match {