Skip to content
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

chore: dont penalize on dropped connections #4031

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions crates/net/network/src/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ where
RequestError::UnsupportedCapability => ReputationChangeKind::BadProtocol,
RequestError::Timeout => ReputationChangeKind::Timeout,
RequestError::ChannelClosed | RequestError::ConnectionDropped => {
ReputationChangeKind::Dropped
// peer is already disconnected
return
}
RequestError::BadResponse => ReputationChangeKind::BadTransactions,
};
Expand Down Expand Up @@ -561,7 +562,8 @@ where
this.on_request_error(req.peer_id, req_err);
}
Poll::Ready(Err(_)) => {
this.on_request_error(req.peer_id, RequestError::ConnectionDropped)
// request channel closed/dropped
this.on_request_error(req.peer_id, RequestError::ChannelClosed)
}
}
}
Expand Down
Loading