mirror of
https://github.com/logos-messaging/nim-chat-sdk.git
synced 2026-01-06 16:13:10 +00:00
fix: added todos
This commit is contained in:
parent
a567e0ab9f
commit
f2d8113f70
@ -22,6 +22,8 @@ type
|
||||
|
||||
const BUCKET_STATE_KEY = "rate_limit_bucket_state"
|
||||
|
||||
## TODO find a way to make these procs async
|
||||
|
||||
proc new*[T](M: type[RateLimitStore[T]], db: DbConn): Future[M] {.async} =
|
||||
result = M(db: db, criticalLength: 0, normalLength: 0, nextBatchId: 1)
|
||||
|
||||
|
||||
@ -4,6 +4,8 @@ import chronos, std/math, std/options
|
||||
|
||||
const BUDGET_COMPENSATION_LIMIT_PERCENT = 0.25
|
||||
|
||||
## TODO! This will be remoded and replaced by https://github.com/status-im/nim-chronos/pull/582
|
||||
|
||||
## This is an extract from chronos/rate_limit.nim due to the found bug in the original implementation.
|
||||
## Unfortunately that bug cannot be solved without harm the original features of TokenBucket class.
|
||||
## So, this current shortcut is used to enable move ahead with nwaku rate limiter implementation.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user