mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 04:01:51 +00:00
merge with unstable
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::local_network::{EXECUTION_PORT, INVALID_ADDRESS, TERMINAL_BLOCK, TERMINAL_DIFFICULTY};
|
||||
use crate::local_network::{EXECUTION_PORT, TERMINAL_BLOCK, TERMINAL_DIFFICULTY};
|
||||
use crate::{checks, LocalNetwork, E};
|
||||
use clap::ArgMatches;
|
||||
use eth1::{Eth1Endpoint, DEFAULT_CHAIN_ID};
|
||||
@@ -56,15 +56,12 @@ pub fn run_eth1_sim(matches: &ArgMatches) -> Result<(), String> {
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let log_level = "debug";
|
||||
let log_format = None;
|
||||
|
||||
let mut env = EnvironmentBuilder::minimal()
|
||||
.initialize_logger(LoggerConfig {
|
||||
path: None,
|
||||
debug_level: log_level,
|
||||
logfile_debug_level: "debug",
|
||||
log_format,
|
||||
debug_level: String::from("debug"),
|
||||
logfile_debug_level: String::from("debug"),
|
||||
log_format: None,
|
||||
log_color: false,
|
||||
disable_log_timestamp: false,
|
||||
max_log_size: 0,
|
||||
@@ -138,7 +135,7 @@ pub fn run_eth1_sim(matches: &ArgMatches) -> Result<(), String> {
|
||||
let mut beacon_config = testing_client_config();
|
||||
|
||||
beacon_config.genesis = ClientGenesis::DepositContract;
|
||||
beacon_config.eth1.endpoints = Eth1Endpoint::NoAuth(vec![eth1_endpoint]);
|
||||
beacon_config.eth1.endpoint = Eth1Endpoint::NoAuth(eth1_endpoint);
|
||||
beacon_config.eth1.deposit_contract_address = deposit_contract_address;
|
||||
beacon_config.eth1.deposit_contract_deploy_block = 0;
|
||||
beacon_config.eth1.lowest_cached_block_number = 0;
|
||||
@@ -173,18 +170,8 @@ pub fn run_eth1_sim(matches: &ArgMatches) -> Result<(), String> {
|
||||
/*
|
||||
* One by one, add beacon nodes to the network.
|
||||
*/
|
||||
for i in 0..node_count - 1 {
|
||||
let mut config = beacon_config.clone();
|
||||
if i % 2 == 0 {
|
||||
if let Eth1Endpoint::NoAuth(endpoints) = &mut config.eth1.endpoints {
|
||||
endpoints.insert(
|
||||
0,
|
||||
SensitiveUrl::parse(INVALID_ADDRESS)
|
||||
.expect("Unable to parse invalid address"),
|
||||
)
|
||||
}
|
||||
}
|
||||
network.add_beacon_node(config).await?;
|
||||
for _ in 0..node_count - 1 {
|
||||
network.add_beacon_node(beacon_config.clone()).await?;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -41,15 +41,12 @@ pub fn run_no_eth1_sim(matches: &ArgMatches) -> Result<(), String> {
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let log_level = "debug";
|
||||
let log_format = None;
|
||||
|
||||
let mut env = EnvironmentBuilder::mainnet()
|
||||
.initialize_logger(LoggerConfig {
|
||||
path: None,
|
||||
debug_level: log_level,
|
||||
logfile_debug_level: "debug",
|
||||
log_format,
|
||||
debug_level: String::from("debug"),
|
||||
logfile_debug_level: String::from("debug"),
|
||||
log_format: None,
|
||||
log_color: false,
|
||||
disable_log_timestamp: false,
|
||||
max_log_size: 0,
|
||||
|
||||
@@ -48,9 +48,9 @@ fn syncing_sim(
|
||||
let mut env = EnvironmentBuilder::minimal()
|
||||
.initialize_logger(LoggerConfig {
|
||||
path: None,
|
||||
debug_level: log_level,
|
||||
logfile_debug_level: "debug",
|
||||
log_format,
|
||||
debug_level: String::from(log_level),
|
||||
logfile_debug_level: String::from("debug"),
|
||||
log_format: log_format.map(String::from),
|
||||
log_color: false,
|
||||
disable_log_timestamp: false,
|
||||
max_log_size: 0,
|
||||
|
||||
Reference in New Issue
Block a user