From b29882638176dd2d49f150196780f9ec024f9ed5 Mon Sep 17 00:00:00 2001 From: pablo Date: Thu, 3 Jul 2025 12:14:13 +0300 Subject: [PATCH] feat: cleanup --- waku/common/rate_limit/token_bucket.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/waku/common/rate_limit/token_bucket.nim b/waku/common/rate_limit/token_bucket.nim index a545c62fa..b938ef039 100644 --- a/waku/common/rate_limit/token_bucket.nim +++ b/waku/common/rate_limit/token_bucket.nim @@ -109,8 +109,7 @@ proc update(bucket: TokenBucket, currentTime: Moment) = else: updateStrict(bucket, currentTime) -## Returns the available capacity ratio of the bucket. -## as a float number between 0.0 (empty) and 1.0 (full). +## Returns the available capacity ratio of the bucket: 0.0 (empty); 1.0 (full) proc getAvailableCapacityRatio*(bucket: TokenBucket, currentTime: Moment): float = if periodElapsed(bucket, currentTime): return 1.0