Skip to content

Commit 0a947c7

Browse files
committed
Maintain backwards compatiblity, deprecate flag
1 parent 6bc70f5 commit 0a947c7

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

beacon_node/src/cli.rs

+6
Original file line numberDiff line numberDiff line change
@@ -1268,5 +1268,11 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
12681268
.default_value("64")
12691269
.takes_value(true)
12701270
)
1271+
.arg(
1272+
Arg::with_name("disable-duplicate-warn-logs")
1273+
.long("disable-duplicate-warn-logs")
1274+
.help("This flag is deprecated and has no effect.")
1275+
.takes_value(false)
1276+
)
12711277
.group(ArgGroup::with_name("enable_http").args(&["http", "gui", "staking"]).multiple(true))
12721278
}

lighthouse/tests/beacon_node.rs

+19
Original file line numberDiff line numberDiff line change
@@ -2584,3 +2584,22 @@ fn genesis_state_url_value() {
25842584
assert_eq!(config.genesis_state_url_timeout, Duration::from_secs(42));
25852585
});
25862586
}
2587+
2588+
#[test]
2589+
fn disable_duplicate_warn_logs_default() {
2590+
CommandLineTest::new()
2591+
.run_with_zero_port()
2592+
.with_config(|config| {
2593+
assert_eq!(config.network.disable_duplicate_warn_logs, false);
2594+
});
2595+
}
2596+
2597+
#[test]
2598+
fn disable_duplicate_warn_logs() {
2599+
CommandLineTest::new()
2600+
.flag("disable-duplicate-warn-logs", None)
2601+
.run_with_zero_port()
2602+
.with_config(|config| {
2603+
assert_eq!(config.network.disable_duplicate_warn_logs, true);
2604+
});
2605+
}

0 commit comments

Comments
 (0)