fix: added todos

This commit is contained in:
pablo 2025-09-01 05:55:44 +03:00
parent a567e0ab9f
commit f2d8113f70
No known key found for this signature in database
GPG Key ID: 78F35FCC60FDC63A
2 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -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.