Enable count-unrealized
by default (#3389)
## Issue Addressed Enable https://github.com/sigp/lighthouse/pull/3322 by default on all networks. The feature can be opted out of using `--count-unrealized=false` (the CLI flag is updated to take a parameter).
This commit is contained in:
parent
b3ce8d0de9
commit
fdfdb9b57c
@ -752,8 +752,9 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
|||||||
Arg::with_name("count-unrealized")
|
Arg::with_name("count-unrealized")
|
||||||
.long("count-unrealized")
|
.long("count-unrealized")
|
||||||
.hidden(true)
|
.hidden(true)
|
||||||
.help("**EXPERIMENTAL** Enables an alternative, potentially more performant FFG \
|
.help("Enables an alternative, potentially more performant FFG \
|
||||||
vote tracking method.")
|
vote tracking method.")
|
||||||
.takes_value(false)
|
.takes_value(true)
|
||||||
|
.default_value("true")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -630,9 +630,8 @@ pub fn get_config<E: EthSpec>(
|
|||||||
client_config.chain.fork_choice_before_proposal_timeout_ms = timeout;
|
client_config.chain.fork_choice_before_proposal_timeout_ms = timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
if cli_args.is_present("count-unrealized") {
|
client_config.chain.count_unrealized =
|
||||||
client_config.chain.count_unrealized = true;
|
clap_utils::parse_required(cli_args, "count-unrealized")?;
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Builder fallback configs.
|
* Builder fallback configs.
|
||||||
|
@ -132,6 +132,37 @@ fn fork_choice_before_proposal_timeout_zero() {
|
|||||||
.with_config(|config| assert_eq!(config.chain.fork_choice_before_proposal_timeout_ms, 0));
|
.with_config(|config| assert_eq!(config.chain.fork_choice_before_proposal_timeout_ms, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn count_unrealized_default() {
|
||||||
|
CommandLineTest::new()
|
||||||
|
.run_with_zero_port()
|
||||||
|
.with_config(|config| assert!(config.chain.count_unrealized));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn count_unrealized_no_arg() {
|
||||||
|
CommandLineTest::new()
|
||||||
|
.flag("count-unrealized", None)
|
||||||
|
.run_with_zero_port()
|
||||||
|
.with_config(|config| assert!(config.chain.count_unrealized));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn count_unrealized_false() {
|
||||||
|
CommandLineTest::new()
|
||||||
|
.flag("count-unrealized", Some("false"))
|
||||||
|
.run_with_zero_port()
|
||||||
|
.with_config(|config| assert!(!config.chain.count_unrealized));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn count_unrealized_true() {
|
||||||
|
CommandLineTest::new()
|
||||||
|
.flag("count-unrealized", Some("true"))
|
||||||
|
.run_with_zero_port()
|
||||||
|
.with_config(|config| assert!(config.chain.count_unrealized));
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn freezer_dir_flag() {
|
fn freezer_dir_flag() {
|
||||||
let dir = TempDir::new().expect("Unable to create temporary directory");
|
let dir = TempDir::new().expect("Unable to create temporary directory");
|
||||||
|
Loading…
Reference in New Issue
Block a user