Improve substream management (#3261)

## Issue Addressed

Which issue # does this PR address?

## Proposed Changes

Please list or describe the changes introduced by this PR.

## Additional Info

Please provide any additional information. For example, future considerations
or information useful for reviewers.
This commit is contained in:
Divma
2022-06-10 06:58:50 +00:00
parent 11d80a6a38
commit 3dd50bda11
3 changed files with 35 additions and 29 deletions

View File

@@ -457,10 +457,7 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
debug!(self.log, "Internal RPC Error"; "error" => %e, "peer_id" => %peer_id);
return;
}
RPCError::HandlerRejected => {
// Our fault. Do nothing
return;
}
RPCError::HandlerRejected => PeerAction::Fatal,
RPCError::InvalidData(_) => {
// Peer is not complying with the protocol. This is considered a malicious action
PeerAction::Fatal