diff --git a/charts/polkadot-registrar-challenger/Chart.yaml b/charts/polkadot-registrar-challenger/Chart.yaml index 3ae1d027..3d36be03 100644 --- a/charts/polkadot-registrar-challenger/Chart.yaml +++ b/charts/polkadot-registrar-challenger/Chart.yaml @@ -1,5 +1,5 @@ description: Polkadot Challenger name: polkadot-registrar-challenger -version: v0.6.0 -appVersion: v0.6.0 +version: v0.6.1 +appVersion: v0.6.1 apiVersion: v2 diff --git a/src/lib.rs b/src/lib.rs index 041db31f..13a9761d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -64,16 +64,16 @@ impl LogLevel { #[derive(Debug, Deserialize)] #[serde(rename_all = "snake_case", tag = "role", content = "config")] enum InstanceType { - AdapterListener(AdapterConfig), - SessionNotifier(NotifierConfig), - SingleInstance(SingleInstanceConfig), + AdapterListener(AdapterNotifierConfig), + SessionNotifier(AdapterNotifierConfig), + SingleInstance(AdapterNotifierConfig), } #[derive(Debug, Deserialize)] #[serde(rename_all = "snake_case")] -struct SingleInstanceConfig { - pub adapter: AdapterConfig, - pub notifier: NotifierConfig, +struct AdapterNotifierConfig { + pub adapter: Option, + pub notifier: Option, } #[derive(Debug, Deserialize, Clone)] @@ -194,15 +194,15 @@ pub async fn run() -> Result<()> { match instance { InstanceType::AdapterListener(config) => { info!("Starting adapter listener instance"); - config_adapter_listener(db, config).await?; + config_adapter_listener(db, config.adapter.unwrap()).await?; } InstanceType::SessionNotifier(config) => { info!("Starting session notifier instance"); - config_session_notifier(db, config).await?; + config_session_notifier(db, config.notifier.unwrap()).await?; } InstanceType::SingleInstance(config) => { info!("Starting adapter listener and session notifier instances"); - let (adapter_config, notifier_config) = (config.adapter, config.notifier); + let (adapter_config, notifier_config) = (config.adapter.unwrap(), config.notifier.unwrap()); config_adapter_listener(db.clone(), adapter_config).await?; config_session_notifier(db, notifier_config).await?;