Tidy grpc and misc things

This commit is contained in:
Paul Hauner
2019-11-23 12:16:41 +11:00
parent 9e5a9cefe2
commit ef4e12da51
9 changed files with 17 additions and 79 deletions

View File

@@ -62,7 +62,6 @@ pub struct ClientBuilder<T: BeaconChainTypes> {
libp2p_network: Option<Arc<NetworkService<T>>>,
libp2p_network_send: Option<UnboundedSender<NetworkMessage>>,
http_listen_addr: Option<SocketAddr>,
grpc_listen_addr: Option<(String, u16)>,
websocket_listen_addr: Option<SocketAddr>,
eth_spec_instance: T::EthSpec,
}
@@ -94,7 +93,6 @@ where
libp2p_network: None,
libp2p_network_send: None,
http_listen_addr: None,
grpc_listen_addr: None,
websocket_listen_addr: None,
eth_spec_instance,
}
@@ -427,7 +425,6 @@ where
beacon_chain: self.beacon_chain,
libp2p_network: self.libp2p_network,
http_listen_addr: self.http_listen_addr,
grpc_listen_addr: self.grpc_listen_addr,
websocket_listen_addr: self.websocket_listen_addr,
_exit_signals: self.exit_signals,
}

View File

@@ -25,7 +25,6 @@ pub struct Client<T: BeaconChainTypes> {
libp2p_network: Option<Arc<NetworkService<T>>>,
http_listen_addr: Option<SocketAddr>,
websocket_listen_addr: Option<SocketAddr>,
grpc_listen_addr: Option<(String, u16)>,
/// Exit signals will "fire" when dropped, causing each service to exit gracefully.
_exit_signals: Vec<Signal>,
}
@@ -41,11 +40,6 @@ impl<T: BeaconChainTypes> Client<T> {
self.http_listen_addr
}
/// Returns the address of the client's gRPC API server, if it was started.
pub fn grpc_listen_addr(&self) -> Option<(String, u16)> {
self.grpc_listen_addr.clone()
}
/// Returns the address of the client's WebSocket API server, if it was started.
pub fn websocket_listen_addr(&self) -> Option<SocketAddr> {
self.websocket_listen_addr

View File

@@ -103,30 +103,6 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.help("A secp256k1 secret key, represented as ASCII-encoded hex bytes (with or without 0x prefix).")
.takes_value(true),
)
/*
* gRPC parameters.
*/
.arg(
Arg::with_name("no-grpc")
.long("no-grpc")
.help("Disable the gRPC server.")
.takes_value(false),
)
.arg(
Arg::with_name("rpc-address")
.long("rpc-address")
.value_name("ADDRESS")
.help("Listen address for RPC endpoint.")
.takes_value(true),
)
.arg(
Arg::with_name("rpc-port")
.long("rpc-port")
.value_name("PORT")
.help("Listen port for RPC endpoint.")
.conflicts_with("port-bump")
.takes_value(true),
)
/* REST API related arguments */
.arg(
Arg::with_name("no-api")