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.
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user