Commit 5f65565 1 parent 0b0fbfa commit 5f65565 Copy full SHA for 5f65565
File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ export tokenbucket
11
11
12
12
type RateLimitSetting * = tuple [volume: int , period: Duration ]
13
13
14
- let DefaultGlobalNonRelayRateLimit * : RateLimitSetting = (60 , 1 .minutes)
14
+ # Set the default to switch off rate limiting for now
15
+ let DefaultGlobalNonRelayRateLimit * : RateLimitSetting = (0 , 0 .minutes)
15
16
16
17
proc newTokenBucket * (setting: Option [RateLimitSetting ]): Option [TokenBucket ] =
17
18
if setting.isNone:
Original file line number Diff line number Diff line change @@ -244,15 +244,15 @@ proc setupProtocols(
244
244
return err (" failed to mount waku archive protocol: " & mountArcRes.error)
245
245
246
246
# Store setup
247
+ let rateLimitSetting: RateLimitSetting =
248
+ (conf.requestRateLimit, chronos.seconds (conf.requestRatePeriod))
247
249
try :
248
- let rateLimitSetting: RateLimitSetting =
249
- (conf.requestRateLimit, chronos.seconds (conf.requestRatePeriod))
250
250
await mountStore (node, rateLimitSetting)
251
251
except CatchableError :
252
252
return err (" failed to mount waku store protocol: " & getCurrentExceptionMsg ())
253
253
254
254
try :
255
- await mountLegacyStore (node)
255
+ await mountLegacyStore (node, rateLimitSetting )
256
256
except CatchableError :
257
257
return
258
258
err (" failed to mount waku legacy store protocol: " & getCurrentExceptionMsg ())
You can’t perform that action at this time.
0 commit comments