mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-12 02:14:10 +00:00
Packet filter cli option (#2523)
## Issue Addressed N/A ## Proposed Changes Adds a cli option to disable packet filter in `lighthouse bootnode`. This is useful in running local testnets as the bootnode bans requests from the same ip(localhost) if the packet filter is enabled.
This commit is contained in:
@@ -45,6 +45,12 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
--subscribe-all-subnets to ensure all attestations are received for import.")
|
||||
.takes_value(false),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("disable-packet-filter")
|
||||
.long("disable-packet-filter")
|
||||
.help("Disables the discovery packet filter. Useful for testing in smaller networks")
|
||||
.takes_value(false),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("zero-ports")
|
||||
.long("zero-ports")
|
||||
|
||||
@@ -612,6 +612,11 @@ pub fn set_network_config(
|
||||
config.discv5_config.enr_update = false;
|
||||
}
|
||||
|
||||
if cli_args.is_present("disable-packet-filter") {
|
||||
warn!(log, "Discv5 packet filter is disabled");
|
||||
config.discv5_config.enable_packet_filter = false;
|
||||
}
|
||||
|
||||
if cli_args.is_present("disable-discovery") {
|
||||
config.disable_discovery = true;
|
||||
warn!(log, "Discovery is disabled. New peers will not be found");
|
||||
|
||||
Reference in New Issue
Block a user