Parse http CLI args for HTTP server

This commit is contained in:
Paul Hauner
2019-05-28 13:50:51 +10:00
parent 2a04da8bf7
commit 3f27fd4edf
4 changed files with 53 additions and 14 deletions

View File

@@ -115,13 +115,17 @@ where
// Start the `http_server` service.
//
// Note: presently we are ignoring the config and _always_ starting a HTTP server.
let http_exit_signal = Some(http_server::start_service(
&config.http_conf,
executor,
network_send,
beacon_chain.clone(),
&log,
));
let http_exit_signal = if config.http_conf.enabled {
Some(http_server::start_service(
&config.http_conf,
executor,
network_send,
beacon_chain.clone(),
&log,
))
} else {
None
};
let (slot_timer_exit_signal, exit) = exit_future::signal();
if let Ok(Some(duration_to_next_slot)) = beacon_chain.slot_clock.duration_to_next_slot() {