mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-22 18:31:07 +00:00
Rate limit improvements (#6315)
* We actually don't need to rate limit redundant requests. Those redundant requests should not actually happen, but still. * Add some logging. * Also log message when the receiving side hit the rate limit. * Update node/network/dispute-distribution/src/sender/mod.rs Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Co-authored-by: eskimor <eskimor@no-such-url.com> Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
This commit is contained in:
@@ -302,6 +302,12 @@ where
|
||||
|
||||
// Queue request:
|
||||
if let Err((authority_id, req)) = self.peer_queues.push_req(authority_id, req) {
|
||||
gum::debug!(
|
||||
target: LOG_TARGET,
|
||||
?authority_id,
|
||||
?peer,
|
||||
"Peer hit the rate limit - dropping message."
|
||||
);
|
||||
req.send_outgoing_response(OutgoingResponse {
|
||||
result: Err(()),
|
||||
reputation_changes: vec![COST_APPARENT_FLOOD],
|
||||
|
||||
Reference in New Issue
Block a user