From 7cc44f4fa96336749fb6cec528b7e2152a028eb4 Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Wed, 15 Jan 2020 19:39:53 -0800 Subject: [PATCH] Move server.rs to connection.rs and change imports. --- zebra-network/src/peer.rs | 6 +++--- zebra-network/src/peer/{server.rs => connection.rs} | 0 zebra-network/src/peer/handshake.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename zebra-network/src/peer/{server.rs => connection.rs} (100%) diff --git a/zebra-network/src/peer.rs b/zebra-network/src/peer.rs index 90cea0ece..b98824c3e 100644 --- a/zebra-network/src/peer.rs +++ b/zebra-network/src/peer.rs @@ -2,20 +2,20 @@ /// Handles outbound requests from our node to the network. mod client; +/// The per-peer connection state machine. +mod connection; /// Wrapper around handshake logic that also opens a TCP connection. mod connector; /// Peer-related errors. mod error; /// Performs peer handshakes. mod handshake; -/// Handles inbound requests from the network to our node. -mod server; use client::ClientRequest; use error::ErrorSlot; pub use client::Client; +pub use connection::Connection; pub use connector::Connector; pub use error::{HandshakeError, PeerError, SharedPeerError}; pub use handshake::Handshake; -pub use server::Connection; diff --git a/zebra-network/src/peer/server.rs b/zebra-network/src/peer/connection.rs similarity index 100% rename from zebra-network/src/peer/server.rs rename to zebra-network/src/peer/connection.rs diff --git a/zebra-network/src/peer/handshake.rs b/zebra-network/src/peer/handshake.rs index 9fd9b650b..30b70d214 100644 --- a/zebra-network/src/peer/handshake.rs +++ b/zebra-network/src/peer/handshake.rs @@ -194,9 +194,9 @@ where let (peer_tx, peer_rx) = stream.split(); - use super::server; + use super::connection; let server = Connection { - state: server::State::AwaitingRequest, + state: connection::State::AwaitingRequest, svc: internal_service, client_rx: server_rx, error_slot: slot,