Skip to content

Commit e544db7

Browse files
authored
Merge pull request #108 from uprendis/feature/raise-topics-limit
Raise topics limit for API
2 parents 1a4dfdd + ef28b3e commit e544db7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

topicsdb/topicsdb.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/ethereum/go-ethereum/core/types"
1313
)
1414

15-
const MaxTopicsCount = 0xff
15+
const MaxTopicsCount = 1024
1616

1717
var (
1818
ErrTooManyTopics = fmt.Errorf("Too many topics")
@@ -132,10 +132,6 @@ func (tt *Index) MustPush(recs ...*types.Log) {
132132
// Write log record to database.
133133
func (tt *Index) Push(recs ...*types.Log) error {
134134
for _, rec := range recs {
135-
if len(rec.Topics) > MaxTopicsCount {
136-
return ErrTooManyTopics
137-
}
138-
139135
var (
140136
id = NewID(rec.BlockNumber, rec.TxHash, rec.Index)
141137
count = posToBytes(uint8(len(rec.Topics)))

0 commit comments

Comments
 (0)