From 65a48d5c511a5fabb548fdd701eb9ec350e1c9b9 Mon Sep 17 00:00:00 2001 From: NIC619 Date: Sat, 14 Sep 2019 17:42:18 +0800 Subject: [PATCH] Remove unused `select_protocol_or_fail` --- libp2p/protocol_muxer/multiselect_client.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/libp2p/protocol_muxer/multiselect_client.py b/libp2p/protocol_muxer/multiselect_client.py index 5fcfc45..fcd55d0 100644 --- a/libp2p/protocol_muxer/multiselect_client.py +++ b/libp2p/protocol_muxer/multiselect_client.py @@ -38,24 +38,6 @@ class MultiselectClient(IMultiselectClient): # Handshake succeeded if this point is reached - async def select_protocol_or_fail( - self, protocol: TProtocol, communicator: IMultiselectCommunicator - ) -> TProtocol: - """ - Send message to multiselect selecting protocol - and fail if multiselect does not return same protocol - :param protocol: protocol to select - :param stream: stream to communicate with multiselect over - :return: selected protocol - """ - # Perform handshake to ensure multiselect protocol IDs match - await self.handshake(communicator) - - # Try to select the given protocol - selected_protocol = await self.try_select(communicator, protocol) - - return selected_protocol - async def select_one_of( self, protocols: Sequence[TProtocol], communicator: IMultiselectCommunicator ) -> TProtocol: