mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-02 16:21:42 +00:00
Strict slashing protection by default (#1750)
## Proposed Changes Replace `--strict-slashing-protection` by `--init-slashing-protection` and remove mentions of `--auto-register`
This commit is contained in:
@@ -106,6 +106,14 @@ pub fn testing_client_config() -> ClientConfig {
|
||||
client_config
|
||||
}
|
||||
|
||||
pub fn testing_validator_config() -> ValidatorConfig {
|
||||
ValidatorConfig {
|
||||
init_slashing_protection: true,
|
||||
disable_auto_discover: false,
|
||||
..ValidatorConfig::default()
|
||||
}
|
||||
}
|
||||
|
||||
/// Contains the directories for a `LocalValidatorClient`.
|
||||
///
|
||||
/// This struct is separate to `LocalValidatorClient` to allow for pre-computation of validator
|
||||
|
||||
@@ -4,8 +4,8 @@ use eth1::http::Eth1NetworkId;
|
||||
use eth1_test_rig::GanacheEth1Instance;
|
||||
use futures::prelude::*;
|
||||
use node_test_rig::{
|
||||
environment::EnvironmentBuilder, testing_client_config, ClientGenesis, ValidatorConfig,
|
||||
ValidatorFiles,
|
||||
environment::EnvironmentBuilder, testing_client_config, testing_validator_config,
|
||||
ClientGenesis, ValidatorFiles,
|
||||
};
|
||||
use rayon::prelude::*;
|
||||
use std::net::{IpAddr, Ipv4Addr};
|
||||
@@ -128,14 +128,7 @@ pub fn run_eth1_sim(matches: &ArgMatches) -> Result<(), String> {
|
||||
*/
|
||||
for (i, files) in validator_files.into_iter().enumerate() {
|
||||
network
|
||||
.add_validator_client(
|
||||
ValidatorConfig {
|
||||
disable_auto_discover: false,
|
||||
..ValidatorConfig::default()
|
||||
},
|
||||
i,
|
||||
files,
|
||||
)
|
||||
.add_validator_client(testing_validator_config(), i, files)
|
||||
.await?;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ use crate::{checks, LocalNetwork};
|
||||
use clap::ArgMatches;
|
||||
use futures::prelude::*;
|
||||
use node_test_rig::{
|
||||
environment::EnvironmentBuilder, testing_client_config, ClientGenesis, ValidatorConfig,
|
||||
ValidatorFiles,
|
||||
environment::EnvironmentBuilder, testing_client_config, testing_validator_config,
|
||||
ClientGenesis, ValidatorFiles,
|
||||
};
|
||||
use rayon::prelude::*;
|
||||
use std::net::{IpAddr, Ipv4Addr};
|
||||
@@ -99,14 +99,7 @@ pub fn run_no_eth1_sim(matches: &ArgMatches) -> Result<(), String> {
|
||||
let add_validators_fut = async {
|
||||
for (i, files) in validator_files.into_iter().enumerate() {
|
||||
network
|
||||
.add_validator_client(
|
||||
ValidatorConfig {
|
||||
disable_auto_discover: false,
|
||||
..ValidatorConfig::default()
|
||||
},
|
||||
i,
|
||||
files,
|
||||
)
|
||||
.add_validator_client(testing_validator_config(), i, files)
|
||||
.await?;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user