Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 2477f34

Browse files
committed
client/network/light: Do not reduce retry count on missing peer
1 parent 5a609ec commit 2477f34

File tree

1 file changed

+2
-2
lines changed
  • client/network/src/light_client_requests

1 file changed

+2
-2
lines changed

client/network/src/light_client_requests/sender.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,6 @@ impl<B: Block> Stream for LightClientRequestSender<B> {
480480
continue
481481
}
482482

483-
pending_request.attempts_left -= 1;
484-
485483
let protocol = if pending_request.request.is_block_request() {
486484
self.config.block_protocol.clone()
487485
} else {
@@ -527,6 +525,8 @@ impl<B: Block> Stream for LightClientRequestSender<B> {
527525

528526
peer_info.status = PeerStatus::Busy;
529527

528+
pending_request.attempts_left -= 1;
529+
530530
self.sent_requests.push(async move {
531531
(pending_request.into_sent(peer_id), rx.await)
532532
}.boxed());

0 commit comments

Comments
 (0)