diff --git a/beacon_node/rest_api/src/config.rs b/beacon_node/rest_api/src/config.rs index 90ac0821b..c262a128a 100644 --- a/beacon_node/rest_api/src/config.rs +++ b/beacon_node/rest_api/src/config.rs @@ -16,7 +16,7 @@ pub struct Config { impl Default for Config { fn default() -> Self { Config { - enabled: true, // rest_api enabled by default + enabled: true, listen_address: Ipv4Addr::new(127, 0, 0, 1), port: 5052, } @@ -25,8 +25,8 @@ impl Default for Config { impl Config { pub fn apply_cli_args(&mut self, args: &ArgMatches) -> Result<(), &'static str> { - if args.is_present("api") { - self.enabled = true; + if args.is_present("no-api") { + self.enabled = false; } if let Some(rpc_address) = args.value_of("api-address") { diff --git a/beacon_node/rpc/src/config.rs b/beacon_node/rpc/src/config.rs index 0f031ddc6..47eff6824 100644 --- a/beacon_node/rpc/src/config.rs +++ b/beacon_node/rpc/src/config.rs @@ -16,7 +16,7 @@ pub struct Config { impl Default for Config { fn default() -> Self { Config { - enabled: false, // rpc disabled by default + enabled: true, listen_address: Ipv4Addr::new(127, 0, 0, 1), port: 5051, } @@ -25,8 +25,8 @@ impl Default for Config { impl Config { pub fn apply_cli_args(&mut self, args: &ArgMatches) -> Result<(), &'static str> { - if args.is_present("rpc") { - self.enabled = true; + if args.is_present("no-grpc") { + self.enabled = false; } if let Some(rpc_address) = args.value_of("rpc-address") { diff --git a/beacon_node/rpc/src/lib.rs b/beacon_node/rpc/src/lib.rs index eef009292..59902ff43 100644 --- a/beacon_node/rpc/src/lib.rs +++ b/beacon_node/rpc/src/lib.rs @@ -80,7 +80,12 @@ pub fn start_server( let spawn_rpc = { server.start(); for &(ref host, port) in server.bind_addrs() { - info!(log, "gRPC listening on {}:{}", host, port); + info!( + log, + "gRPC API started"; + "port" => port, + "host" => host, + ); } rpc_exit.and_then(move |_| { info!(log, "RPC Server shutting down"); diff --git a/beacon_node/src/main.rs b/beacon_node/src/main.rs index 02e30b660..26537c6f7 100644 --- a/beacon_node/src/main.rs +++ b/beacon_node/src/main.rs @@ -120,10 +120,9 @@ fn main() { * gRPC parameters. */ .arg( - Arg::with_name("rpc") - .long("rpc") - .value_name("RPC") - .help("Enable the RPC server.") + Arg::with_name("no-grpc") + .long("no-grpc") + .help("Disable the gRPC server.") .takes_value(false), ) .arg( @@ -142,10 +141,9 @@ fn main() { ) /* Client related arguments */ .arg( - Arg::with_name("api") - .long("api") - .value_name("API") - .help("Enable the RESTful HTTP API server.") + Arg::with_name("no-api") + .long("no-api") + .help("Disable RESTful HTTP API server.") .takes_value(false), ) .arg(