From 901393b6642e5f01971d04fa79cd7ccfb4dac9ef Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Mon, 26 Aug 2019 16:02:05 +1000 Subject: [PATCH] Clean datadir after config files have been loaded --- 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 2c928ad44..f47a2ddb0 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -63,10 +63,6 @@ fn process_testnet_subcommand( builder.set_random_datadir()?; } - if cli_args.is_present("force") { - builder.clean_datadir()?; - } - if let Some(path_string) = cli_args.value_of("eth2-config") { let path = path_string .parse::() @@ -83,6 +79,10 @@ fn process_testnet_subcommand( builder.load_client_config(path)?; } + if cli_args.is_present("force") { + builder.clean_datadir()?; + } + info!( log, "Creating new datadir";