fix: remove rateLimiter

This commit is contained in:
Richard Ramos 2024-09-18 17:19:31 -04:00
parent 3df361b6fd
commit aa06ad58d8
No known key found for this signature in database
GPG Key ID: 1CE87DB518195760
2 changed files with 1 additions and 5 deletions

View File

@ -11,7 +11,6 @@ import (
"time"
"golang.org/x/exp/maps"
"golang.org/x/time/rate"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/google/uuid"
@ -139,13 +138,10 @@ func Execute(ctx context.Context, options Options) error {
}
defer wakuNode.Stop()
rateLimiters := make(map[peer.ID]*rate.Limiter)
var storenodeIDs peer.IDSlice
for _, s := range storenodes {
wakuNode.Host().Peerstore().AddAddrs(s.ID, s.Addrs, peerstore.PermanentAddrTTL)
storenodeIDs = append(storenodeIDs, s.ID)
rateLimiters[s.ID] = rate.NewLimiter(7, 1)
}
err = dbStore.Start(ctx, wakuNode.Timesource())

2
go.mod
View File

@ -22,7 +22,6 @@ require (
go.opencensus.io v0.24.0
go.uber.org/zap v1.27.0
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
golang.org/x/time v0.5.0
google.golang.org/protobuf v1.34.1
)
@ -162,6 +161,7 @@ require (
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.21.0 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect