mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 22:08:30 +00:00
IDONTWANT message optimisation to cutoff for smaller messages (#6456)
* idontwant message opitmising * requested changes and linter appeasing * added the config cli flag * Merge branch 'unstable' into fix/idontwant-optimise * cli docs generated * const declaration * Hide extra technical cli flag * passing ci * Merge branch 'unstable' into fix/idontwant-optimise
This commit is contained in:
@@ -1487,6 +1487,20 @@ pub fn set_network_config(
|
||||
Some(Default::default())
|
||||
}
|
||||
};
|
||||
|
||||
if let Some(idontwant_message_size_threshold) =
|
||||
cli_args.get_one::<String>("idontwant-message-size-threshold")
|
||||
{
|
||||
config.idontwant_message_size_threshold = idontwant_message_size_threshold
|
||||
.parse::<usize>()
|
||||
.map_err(|_| {
|
||||
format!(
|
||||
"Invalid idontwant message size threshold value passed: {}",
|
||||
idontwant_message_size_threshold
|
||||
)
|
||||
})?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user