Ver código fonte

eth/filters: make filterLogs func more readable (#16920)

knarfeh 7 anos atrás
pai
commit
e75d0a6e4c
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      eth/filters/filter.go

+ 3 - 3
eth/filters/filter.go

@@ -258,9 +258,9 @@ Logs:
 		if len(topics) > len(log.Topics) {
 			continue Logs
 		}
-		for i, topics := range topics {
-			match := len(topics) == 0 // empty rule set == wildcard
-			for _, topic := range topics {
+		for i, sub := range topics {
+			match := len(sub) == 0 // empty rule set == wildcard
+			for _, topic := range sub {
 				if log.Topics[i] == topic {
 					match = true
 					break