mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 14:54:45 +00:00
Undo some CLI flag breakages (#5902)
* Undo some CLI breakages * Update CLI book docs
This commit is contained in:
@@ -2178,6 +2178,21 @@ fn slasher_broadcast_flag_no_default() {
|
||||
});
|
||||
}
|
||||
#[test]
|
||||
fn slasher_broadcast_flag_no_argument() {
|
||||
CommandLineTest::new()
|
||||
.flag("slasher", None)
|
||||
.flag("slasher-max-db-size", Some("1"))
|
||||
.flag("slasher-broadcast", None)
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| {
|
||||
let slasher_config = config
|
||||
.slasher
|
||||
.as_ref()
|
||||
.expect("Unable to parse Slasher config");
|
||||
assert!(slasher_config.broadcast);
|
||||
});
|
||||
}
|
||||
#[test]
|
||||
fn slasher_broadcast_flag_true() {
|
||||
CommandLineTest::new()
|
||||
.flag("slasher", None)
|
||||
|
||||
@@ -593,7 +593,7 @@ fn wrong_broadcast_flag() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn latency_measurement_service() {
|
||||
fn disable_latency_measurement_service() {
|
||||
CommandLineTest::new()
|
||||
.flag("disable-latency-measurement-service", None)
|
||||
.run()
|
||||
@@ -601,6 +601,16 @@ fn latency_measurement_service() {
|
||||
assert!(!config.enable_latency_measurement_service);
|
||||
});
|
||||
}
|
||||
#[test]
|
||||
fn latency_measurement_service() {
|
||||
// This flag is DEPRECATED so has no effect, but should still be accepted.
|
||||
CommandLineTest::new()
|
||||
.flag("latency-measurement-service", Some("false"))
|
||||
.run()
|
||||
.with_config(|config| {
|
||||
assert!(config.enable_latency_measurement_service);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn validator_registration_batch_size() {
|
||||
|
||||
Reference in New Issue
Block a user