core/bloombits, eth/filters: handle null topics (#15195)
When implementing the new bloombits based filter, I've accidentally broke null topics by removing the special casing of common.Hash{} filter rules, which acted as the wildcard topic until now. This PR fixes the regression, but instead of using the magic hash common.Hash{} as the null wildcard, the PR reworks the code to handle nil topics during parsing, converting a JSON null into nil []common.Hash topic.
Showing
- core/bloombits/matcher.go 14 additions, 2 deletionscore/bloombits/matcher.go
- core/bloombits/matcher_test.go 28 additions, 0 deletionscore/bloombits/matcher_test.go
- eth/filters/api.go 6 additions, 3 deletionseth/filters/api.go
- eth/filters/api_test.go 6 additions, 18 deletionseth/filters/api_test.go
- eth/filters/filter.go 7 additions, 15 deletionseth/filters/filter.go
- eth/filters/filter_system.go 0 additions, 5 deletionseth/filters/filter_system.go
- eth/filters/filter_system_test.go 7 additions, 5 deletionseth/filters/filter_system_test.go
Loading
Please register or sign in to comment