From 50558e61f7b1f020abaedbcac41e9813ae9f34e7 Mon Sep 17 00:00:00 2001 From: SjonHortensius Date: Wed, 25 Nov 2020 23:56:21 +0000 Subject: [PATCH] Fix #1964: remove mainnet warnings which no longer apply (#1970) ## Issue Addressed #1964 ## Proposed Changes * remove two mainnet warnings * reword `testnet` in logmessage * update test --- account_manager/src/validator/create.rs | 4 ---- lighthouse/src/main.rs | 9 +-------- lighthouse/tests/account_manager.rs | 10 +++------- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/account_manager/src/validator/create.rs b/account_manager/src/validator/create.rs index 99b2ab1158..95a4e8b2f3 100644 --- a/account_manager/src/validator/create.rs +++ b/account_manager/src/validator/create.rs @@ -25,8 +25,6 @@ pub const STORE_WITHDRAW_FLAG: &str = "store-withdrawal-keystore"; pub const COUNT_FLAG: &str = "count"; pub const AT_MOST_FLAG: &str = "at-most"; pub const WALLET_PASSWORD_PROMPT: &str = "Enter your wallet's password:"; -pub const MAINNET_WARNING: &str = "These are *not* mainnet validators! Submitting a mainnet \ - deposit for this validator will result in lost ETH."; pub fn cli_app<'a, 'b>() -> App<'a, 'b> { App::new(CMD) @@ -239,8 +237,6 @@ pub fn cli_run( .map_err(|e| format!("Unable to build validator directory: {:?}", e))?; println!("{}/{}\t{}", i + 1, n, voting_pubkey.to_hex_string()); - - println!("{}", MAINNET_WARNING); } Ok(()) diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index 1055a943f5..c3e49faf41 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -266,17 +266,10 @@ fn run( info!(log, "Lighthouse started"; "version" => VERSION); info!( log, - "Configured for testnet"; + "Configured for network"; "name" => &testnet_name ); - if testnet_name == "mainnet" { - warn!( - log, - "The mainnet specification is being used. This not recommended (yet)." - ) - } - match matches.subcommand() { ("beacon_node", Some(matches)) => { let context = environment.core_context(); diff --git a/lighthouse/tests/account_manager.rs b/lighthouse/tests/account_manager.rs index d64dbb9777..320921e640 100644 --- a/lighthouse/tests/account_manager.rs +++ b/lighthouse/tests/account_manager.rs @@ -284,13 +284,9 @@ impl TestValidator { let pubkeys = stdout[..stdout.len() - 1] .split("\n") .filter_map(|line| { - if line.starts_with(MAINNET_WARNING) { - None - } else { - let tab = line.find("\t").expect("line must have tab"); - let (_, pubkey) = line.split_at(tab + 1); - Some(pubkey.to_string()) - } + let tab = line.find("\t").expect("line must have tab"); + let (_, pubkey) = line.split_at(tab + 1); + Some(pubkey.to_string()) }) .collect::>();