chore: increase maxContentFilter limit for Filter protocol to 100 (#1000)

This commit is contained in:
Prem Chaitanya Prathi 2024-01-08 21:18:56 +05:30 committed by GitHub
parent 68c0ee2598
commit 4e19d93da1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -4,10 +4,11 @@ import (
"context" "context"
"crypto/rand" "crypto/rand"
"encoding/hex" "encoding/hex"
"github.com/waku-org/go-waku/waku/v2/protocol/filter/pb"
"sync" "sync"
"time" "time"
"github.com/waku-org/go-waku/waku/v2/protocol/filter/pb"
"github.com/libp2p/go-libp2p/core/peerstore" "github.com/libp2p/go-libp2p/core/peerstore"
"github.com/waku-org/go-waku/tests" "github.com/waku-org/go-waku/tests"
"github.com/waku-org/go-waku/waku/v2/protocol" "github.com/waku-org/go-waku/waku/v2/protocol"
@ -195,7 +196,7 @@ func (s *FilterTestSuite) TestSubscriptionRefresh() {
} }
func (s *FilterTestSuite) TestContentTopicsLimit() { func (s *FilterTestSuite) TestContentTopicsLimit() {
var maxContentTopics = 30 var maxContentTopics = pb.MaxContentTopicsPerRequest
// Create test context // Create test context
s.ctx, s.ctxCancel = context.WithTimeout(context.Background(), 20*time.Second) // Test can't exceed 10 seconds s.ctx, s.ctxCancel = context.WithTimeout(context.Background(), 20*time.Second) // Test can't exceed 10 seconds

View File

@ -7,7 +7,7 @@ import (
"golang.org/x/exp/slices" "golang.org/x/exp/slices"
) )
const MaxContentTopicsPerRequest = 30 const MaxContentTopicsPerRequest = 100
var ( var (
errMissingRequestID = errors.New("missing RequestId field") errMissingRequestID = errors.New("missing RequestId field")