From b83c12d4269ec7bd7251acca5c19ce9fe1d05203 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Fri, 14 May 2021 13:03:06 +0200 Subject: [PATCH] Discard notifications if we have failed to parse handshake --- client/network/src/protocol.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/network/src/protocol.rs b/client/network/src/protocol.rs index 6dafd8b85f351..6431250c96f3a 100644 --- a/client/network/src/protocol.rs +++ b/client/network/src/protocol.rs @@ -1517,6 +1517,9 @@ impl NetworkBehaviour for Protocol { ); 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 {