From ef28b3eddf888e6c52e16cf4ec33c50c61227a90 Mon Sep 17 00:00:00 2001 From: Egor Lysenko Date: Wed, 5 May 2021 14:10:11 +0700 Subject: [PATCH] increase topics limit in topicsdb to 1024 --- topicsdb/topicsdb.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/topicsdb/topicsdb.go b/topicsdb/topicsdb.go index a3cb08c29..e4cbb5542 100644 --- a/topicsdb/topicsdb.go +++ b/topicsdb/topicsdb.go @@ -12,7 +12,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" ) -const MaxTopicsCount = 0xff +const MaxTopicsCount = 1024 var ( ErrTooManyTopics = fmt.Errorf("Too many topics") @@ -132,10 +132,6 @@ func (tt *Index) MustPush(recs ...*types.Log) { // Write log record to database. func (tt *Index) Push(recs ...*types.Log) error { for _, rec := range recs { - if len(rec.Topics) > MaxTopicsCount { - return ErrTooManyTopics - } - var ( id = NewID(rec.BlockNumber, rec.TxHash, rec.Index) count = posToBytes(uint8(len(rec.Topics)))