-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use RpcSend on RPC::self_limiter::ready_requests #6634
Conversation
98154a7
to
cdf3643
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will look like this if we return pub fn peer_disconnected(&mut self, peer_id: PeerId) -> Vec<(Id, Protocol)> {
// ...
self.ready_requests.retain(|(req_peer_id, event)| {
if let RPCSend::Request(request_id, req) = event {
if req_peer_id == &peer_id {
failed_requests.push((*request_id, req.protocol()));
// Remove the entry
false
} else {
// Keep the entry
true
}
} else {
// unreachable!()
// Remove the unexpected RPCSend variant
false
}
}); We can do that, but I think |
This pull request has been removed from the queue for the following reason: The merge conditions cannot be satisfied due to failing checks: You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
This pull request has been removed from the queue for the following reason: The merge conditions cannot be satisfied due to failing checks: You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
We don't need to store `BehaviourAction` for `ready_requests` and therefore avoid having an `unreachable!` on sigp#6625. Therefore this PR should be merged before it
Issue Addressed
We don't need to store
BehaviourAction
forready_requests
and therefore avoid having anunreachable!
on #6625.Therefore this PR should be merged before it