From 2706025a3450bc074b38c9851386a1c201c434aa Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Wed, 4 Sep 2019 09:07:33 +1000 Subject: [PATCH] Move data dir cleaning in node runtime start --- beacon_node/src/config.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index 47b877ecb..f2c56c524 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -78,6 +78,10 @@ fn process_testnet_subcommand( builder.set_random_datadir()?; } + if cli_args.is_present("force") { + builder.clean_datadir()?; + } + let is_bootstrap = cli_args.subcommand_name() == Some("bootstrap"); if let Some(path_string) = cli_args.value_of("eth2-config") { @@ -112,10 +116,6 @@ fn process_testnet_subcommand( builder.load_client_config(path)?; } - if cli_args.is_present("force") { - builder.clean_datadir()?; - } - info!( log, "Creating new datadir";