diff --git a/crates/common/src/config.rs b/crates/common/src/config.rs index 5f44ba09..72c4d05a 100644 --- a/crates/common/src/config.rs +++ b/crates/common/src/config.rs @@ -22,6 +22,7 @@ pub struct RelayConfig { pub logging: LoggingConfig, #[serde(default)] pub validator_preferences: ValidatorPreferences, + #[serde(default)] pub router_config: RouterConfig, #[serde(default = "default_duration")] pub target_get_payload_propagation_duration_ms: u64, @@ -44,7 +45,9 @@ pub struct PostgresConfig { pub db_name: String, pub user: String, pub password: String, + #[serde(default)] pub region: i16, + #[serde(default)] pub region_name: String, } @@ -125,10 +128,16 @@ impl RouterConfig { // Function to resolve condensed variants and replace them with real routes pub fn resolve_condensed_routes(&mut self) { - if self.contains(Route::All) { - // If All is present, replace it with all real routes - self.remove(&Route::All); + + if self.enabled_routes.is_empty() { + // If no routes are enabled, enable all real routes self.extend([Route::BuilderApi, Route::ProposerApi, Route::DataApi]); + } else { + if self.contains(Route::All) { + // If All is present, replace it with all real routes + self.remove(&Route::All); + self.extend([Route::BuilderApi, Route::ProposerApi, Route::DataApi]); + } } // Replace BuilderApi, ProposerApi, DataApi with their real routes diff --git a/crates/housekeeper/src/housekeeper.rs b/crates/housekeeper/src/housekeeper.rs index 172dd37f..901197fd 100644 --- a/crates/housekeeper/src/housekeeper.rs +++ b/crates/housekeeper/src/housekeeper.rs @@ -136,11 +136,6 @@ impl return; } - // Skip processing if the GetPayload route is enabled. - if self.config.router_config.enabled_routes.iter().any(|r| r.route == Route::GetPayload) { - return; - } - // Only allow one housekeeper task to run at a time. if !self.auctioneer.try_acquire_or_renew_leadership(&self.leader_id).await { return;