@@ -25,7 +25,7 @@ struct QueuedRequest<Id: ReqId, E: EthSpec> {
25
25
}
26
26
27
27
pub ( crate ) struct SelfRateLimiter < Id : ReqId , E : EthSpec > {
28
- /// Requests queued for sending per peer. This requests are stored when the self rate
28
+ /// Requests queued for sending per peer. These requests are stored when the self rate
29
29
/// limiter rejects them. Rate limiting is based on a Peer and Protocol basis, therefore
30
30
/// are stored in the same way.
31
31
delayed_requests : HashMap < ( PeerId , Protocol ) , VecDeque < QueuedRequest < Id , E > > > ,
@@ -49,7 +49,7 @@ pub enum Error {
49
49
}
50
50
51
51
impl < Id : ReqId , E : EthSpec > SelfRateLimiter < Id , E > {
52
- /// Creates a new [`SelfRateLimiter`] based on configration values.
52
+ /// Creates a new [`SelfRateLimiter`] based on configuration values.
53
53
pub fn new ( config : OutboundRateLimiterConfig , log : Logger ) -> Result < Self , & ' static str > {
54
54
debug ! ( log, "Using self rate limiting params" ; "config" => ?config) ;
55
55
let limiter = RateLimiter :: new_with_config ( config. 0 ) ?;
@@ -162,7 +162,7 @@ impl<Id: ReqId, E: EthSpec> SelfRateLimiter<Id, E> {
162
162
163
163
pub fn poll_ready ( & mut self , cx : & mut Context < ' _ > ) -> Poll < BehaviourAction < Id , E > > {
164
164
// First check the requests that were self rate limited, since those might add events to
165
- // the queue. Also do this this before rate limiter prunning to avoid removing and
165
+ // the queue. Also do this before rate limiter pruning to avoid removing and
166
166
// immediately adding rate limiting keys.
167
167
if let Poll :: Ready ( Some ( Ok ( expired) ) ) = self . next_peer_request . poll_expired ( cx) {
168
168
let ( peer_id, protocol) = expired. into_inner ( ) ;
0 commit comments