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

Discard notifications if we have failed to parse handshake #8806

Merged
merged 1 commit into from
Jun 2, 2021
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
3 changes: 3 additions & 0 deletions client/network/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1517,6 +1517,9 @@ impl<B: BlockT> NetworkBehaviour for Protocol<B> {
);
CustomMessageOutcome::None
}
_ if self.bad_handshake_substreams.contains(&(peer_id.clone(), set_id)) => {
CustomMessageOutcome::None
}
_ => {
let protocol_name = self.notification_protocols[usize::from(set_id) - NUM_HARDCODED_PEERSETS].clone();
CustomMessageOutcome::NotificationsReceived {
Expand Down