From 5a91d23df703b4cc5c2a53f0550f3269db757f02 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Mon, 15 Apr 2024 14:25:08 +0200 Subject: [PATCH] eth/filters: change limit to 1K --- eth/filters/api.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eth/filters/api.go b/eth/filters/api.go index ce725ea4fc..56a9de1b21 100644 --- a/eth/filters/api.go +++ b/eth/filters/api.go @@ -43,6 +43,9 @@ var ( // The maximum number of topic criteria allowed, vm.LOG4 - vm.LOG0 const maxTopics = 4 +// The maximum number of allowed topics within a topic criteria +const maxSubTopics = 1000 + // filter is a helper struct that holds meta information over the filter type // and associated subscription in the event system. type filter struct { @@ -562,7 +565,7 @@ func (args *FilterCriteria) UnmarshalJSON(data []byte) error { case []interface{}: // or case e.g. [null, "topic0", "topic1"] - if len(topic) > maxTopics { + if len(topic) > maxSubTopics { return errExceedMaxTopics } for _, rawTopic := range topic {