mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 22:38:34 +00:00
Development feature flag - Disable backfill (#4537)
Often when testing I have to create a hack which is annoying to maintain. I think it might be handy to add a custom compile-time flag that developers can use if they want to test things locally without having to backfill a bunch of blocks. There is probably an argument to have a feature called "backfill" which is enabled by default and can be disabled. I didn't go this route because I think it's counter-intuitive to have a feature that enables a core and necessary behaviour.
This commit is contained in:
@@ -232,6 +232,12 @@ impl<T: BeaconChainTypes> NetworkService<T> {
|
||||
// build the channels for external comms
|
||||
let (network_senders, network_recievers) = NetworkSenders::new();
|
||||
|
||||
#[cfg(feature = "disable-backfill")]
|
||||
warn!(
|
||||
network_log,
|
||||
"Backfill is disabled. DO NOT RUN IN PRODUCTION"
|
||||
);
|
||||
|
||||
// try and construct UPnP port mappings if required.
|
||||
if let Some(upnp_config) = crate::nat::UPnPConfig::from_config(config) {
|
||||
let upnp_log = network_log.new(o!("service" => "UPnP"));
|
||||
|
||||
Reference in New Issue
Block a user