diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index ccb13800f3..08af75141a 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -156,6 +156,13 @@ fn run( environment_builder: EnvironmentBuilder, matches: &ArgMatches, ) -> Result<(), String> { + if std::mem::size_of::() != 8 { + return Err(format!( + "{}bit architecture is not supported (64bit only).", + std::mem::size_of::() * 8 + )); + } + let debug_level = matches .value_of("debug-level") .ok_or_else(|| "Expected --debug-level flag".to_string())?; @@ -180,15 +187,6 @@ fn run( environment.log_to_json_file(path, debug_level, log_format)?; } - if std::mem::size_of::() != 8 { - crit!( - log, - "Lighthouse only supports 64bit CPUs"; - "detected" => format!("{}bit", std::mem::size_of::() * 8) - ); - return Err("Invalid CPU architecture".into()); - } - // Note: the current code technically allows for starting a beacon node _and_ a validator // client at the same time. //