Discard notifications if we have failed to parse handshake (#8806)

This commit is contained in:
Pierre Krieger
2021-06-02 20:41:21 +02:00
committed by GitHub
parent 2ab5f9aeca
commit 152587bcb9
+3
View File
@@ -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 {