mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
Remove pending requests from ready_requests (#6625)
Co-Authored-By: ackintosh <sora.akatsuki@gmail.com> Co-Authored-By: João Oliveira <hello@jxs.pt>
This commit is contained in:
@@ -77,6 +77,14 @@ impl Quota {
|
||||
max_tokens: n,
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub const fn n_every_millis(n: NonZeroU64, millis: u64) -> Self {
|
||||
Quota {
|
||||
replenish_all_every: Duration::from_millis(millis),
|
||||
max_tokens: n,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Manages rate limiting of requests per peer, with differentiated rates per protocol.
|
||||
|
||||
Reference in New Issue
Block a user