Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
nkysg committed Aug 22, 2024
1 parent 2d5eef4 commit 839b791
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/net/network-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ pub trait Peers: PeersInfo {
/// Disconnect an existing connection to the given peer using the provided reason
fn disconnect_peer_with_reason(&self, peer: PeerId, reason: DisconnectReason);

/// Connect to the given peer. NOTE: if the maximum number out outbound sessions is reached,
/// Connect to the given peer. NOTE: if the maximum number out outbound sessions is reached,
/// this won't do anything. See `reth_network::SessionManager::dial_outbound`.
fn reconnect_peer(&self, addr: SocketAddr, peer: PeerId);

Expand Down
2 changes: 1 addition & 1 deletion crates/net/network/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ impl NetworkManager {
NetworkHandleMessage::DisconnectPeer(peer_id, reason) => {
self.swarm.sessions_mut().disconnect(peer_id, reason);
}
NetworkHandleMessage::ReConnect(socket_addr, peer_id) => {
NetworkHandleMessage::Connect(socket_addr, peer_id) => {
self.swarm.sessions_mut().dial_outbound(socket_addr, peer_id);
}
NetworkHandleMessage::SetNetworkState(net_state) => {
Expand Down
6 changes: 3 additions & 3 deletions crates/net/network/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ impl Peers for NetworkHandle {
/// Sends a message to the [`NetworkManager`](crate::NetworkManager) to reconnect to the given
/// peer.
fn reconnect_peer(&self, addr: SocketAddr, peer: PeerId) {
self.send_message(NetworkHandleMessage::ReConnect(addr, peer))
self.send_message(NetworkHandleMessage::Connect(addr, peer))
}

/// Send a reputation change for the given peer.
Expand Down Expand Up @@ -487,6 +487,6 @@ pub(crate) enum NetworkHandleMessage {
DiscoveryListener(UnboundedSender<DiscoveryEvent>),
/// Adds an additional `RlpxSubProtocol`.
AddRlpxSubProtocol(RlpxSubProtocol),
/// Reconnect to the given peer.
ReConnect(SocketAddr, PeerId),
/// Connect to the given peer.
Connect(SocketAddr, PeerId),
}

0 comments on commit 839b791

Please sign in to comment.