diff --git a/substrate/client/network/src/service.rs b/substrate/client/network/src/service.rs index a144c01275eb5..0ac8ca1ecd270 100644 --- a/substrate/client/network/src/service.rs +++ b/substrate/client/network/src/service.rs @@ -744,12 +744,12 @@ impl NetworkService { } /// Returns a collection of currently connected (open) peers. - pub async fn open_peers(&self) -> Result, ()> { + pub async fn connected_peers(&self) -> Result, ()> { let (tx, rx) = oneshot::channel(); let _ = self .to_worker - .unbounded_send(ServiceToWorkerMsg::OpenPeers { pending_response: tx }); + .unbounded_send(ServiceToWorkerMsg::ConnectedPeers { pending_response: tx }); match rx.await { Ok(v) => Ok(v), @@ -1188,7 +1188,7 @@ enum ServiceToWorkerMsg { NetworkState { pending_response: oneshot::Sender>, }, - OpenPeers { + ConnectedPeers { pending_response: oneshot::Sender>, }, DisconnectPeer(PeerId, ProtocolName), @@ -1333,13 +1333,13 @@ where .behaviour_mut() .user_protocol_mut() .disconnect_peer(&who, protocol_name), - ServiceToWorkerMsg::OpenPeers { pending_response } => { - let _ = pending_response.send(self.open_peers()); + ServiceToWorkerMsg::ConnectedPeers { pending_response } => { + let _ = pending_response.send(self.connected_peers()); }, } } - fn open_peers(&self) -> Vec { + fn connected_peers(&self) -> Vec { self.network_service .behaviour() .user_protocol()