Skip to content

Commit

Permalink
Add deprecation warning & restore test
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed Jul 18, 2024
1 parent 43344ad commit 22fda71
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lighthouse/tests/validator_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,12 @@ fn no_doppelganger_protection_flag() {
.run()
.with_config(|config| assert!(!config.enable_doppelganger_protection));
}
#[test]
fn produce_block_v3_flag() {
// The flag is DEPRECATED but providing it should not trigger an error.
// We can delete this test when deleting the flag entirely.
CommandLineTest::new().flag("produce-block-v3", None).run();
}

#[test]
fn no_gas_limit_flag() {
Expand Down
8 changes: 8 additions & 0 deletions validator_client/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,14 @@ impl Config {
config.prefer_builder_proposals = true;
}

if cli_args.get_flag("produce-block-v3") {
warn!(
log,
"produce-block-v3 flag";
"note" => "deprecated flag has no effect and should be removed"
);
}

config.gas_limit = cli_args
.get_one::<String>("gas-limit")
.map(|gas_limit| {
Expand Down

0 comments on commit 22fda71

Please sign in to comment.