Make bootstrapper block til connection established

This commit is contained in:
Paul Hauner
2019-09-04 13:56:30 +10:00
parent 009a7eb9c7
commit 572df4f37e
5 changed files with 44 additions and 11 deletions

View File

@@ -247,10 +247,13 @@ fn process_testnet_subcommand(
) -> Result<(ClientConfig, Eth2Config)> {
let eth2_config = if cli_args.is_present("bootstrap") {
info!(log, "Connecting to bootstrap server");
let bootstrapper = Bootstrapper::from_server_string(format!(
"http://{}:{}",
client_config.server, client_config.server_http_port
))?;
let bootstrapper = Bootstrapper::connect(
format!(
"http://{}:{}",
client_config.server, client_config.server_http_port
),
&log,
)?;
let eth2_config = bootstrapper.eth2_config()?;