Skip to content

Commit 9d4a689

Browse files
committed
fix EN
1 parent 1f1619f commit 9d4a689

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

core/bin/external_node/src/node_builder.rs

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -353,21 +353,35 @@ impl ExternalNodeBuilder {
353353
}
354354

355355
let da_client_secrets = da_client_secrets.context("DA client secrets are missing")?;
356-
match (da_client_config, da_client_secrets) {
357-
(DAClientConfig::Avail(config), DataAvailabilitySecrets::Avail(secret)) => {
358-
self.node.add_layer(AvailWiringLayer::new(config, secret));
356+
match da_client_config {
357+
DAClientConfig::Avail(config) => {
358+
if let DataAvailabilitySecrets::Avail(secret) = da_client_secrets {
359+
self.node.add_layer(AvailWiringLayer::new(config, secret));
360+
} else {
361+
bail!("Avail client selected, missing Avail in secrets")
362+
}
359363
}
360364

361-
(DAClientConfig::Celestia(config), DataAvailabilitySecrets::Celestia(secret)) => {
362-
self.node
363-
.add_layer(CelestiaWiringLayer::new(config, secret));
365+
DAClientConfig::Celestia(config) => {
366+
if let DataAvailabilitySecrets::Celestia(secret) = da_client_secrets {
367+
self.node
368+
.add_layer(CelestiaWiringLayer::new(config, secret));
369+
} else {
370+
bail!("Celestia client selected, missing Celestia in secrets")
371+
}
364372
}
365373

366-
(DAClientConfig::Eigen(config), DataAvailabilitySecrets::Eigen(secret)) => {
367-
self.node.add_layer(EigenWiringLayer::new(config, secret));
374+
DAClientConfig::Eigen(config) => {
375+
if config.eigenda_eth_rpc.is_none() {
376+
if let DataAvailabilitySecrets::Eigen(secret) = da_client_secrets {
377+
self.node.add_layer(EigenWiringLayer::new(config, secret));
378+
} else {
379+
bail!("Eigen client selected, missing Eigen in secrets")
380+
}
381+
}
368382
}
369383

370-
(DAClientConfig::ObjectStore(config), _) => {
384+
DAClientConfig::ObjectStore(config) => {
371385
self.node
372386
.add_layer(ObjectStorageClientWiringLayer::new(config));
373387
}

0 commit comments

Comments
 (0)