Skip to content

Commit 77af698

Browse files
committed
change config field name
1 parent f49b474 commit 77af698

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/apps/prover/src/app.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,13 @@ impl OptionGetter<L1ExecutionClient> for App {
389389
impl OptionGetter<ExecutionClient> for App {
390390
fn generate(&self) -> Option<ExecutionClient> {
391391
let cfg = self.cfg.get(self);
392+
let scroll_endpoint = match &cfg.scroll_endpoint {
393+
Some(scroll_endpoint) if scroll_endpoint.is_empty() => return None,
394+
None => return None,
395+
Some(scroll_endpoint) => scroll_endpoint,
396+
};
392397
let mut mix = MixRpcClient::new(get_timeout(cfg.l2_timeout_secs));
393-
mix.add_endpoint(&self.alive, &[cfg.l2.as_ref()?.clone()]).unwrap();
398+
mix.add_endpoint(&self.alive, &[scroll_endpoint.clone()]).unwrap();
394399
Some(ExecutionClient::new(mix))
395400
}
396401
}
@@ -402,10 +407,10 @@ impl Getter<L2ChainID> for App {
402407
let l2 = self.l2_el.option_get(self);
403408
L2ChainID(match l2.as_ref() {
404409
Some(l2) => l2.chain_id().unwrap(),
405-
None => match self.cfg.get(self).l2_chain_id {
410+
None => match self.cfg.get(self).scroll_chain_id {
406411
Some(chain_id) => chain_id,
407412
None => panic!(
408-
"config error: missing both l2 and l2_chain_id, should at least provide one"
413+
"config error: missing both scroll_endpoint and scroll_chain_id, should at least provide one"
409414
),
410415
},
411416
})

src/apps/prover/src/types.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ pub struct Config {
1313
pub scroll_chain: Option<ScrollChain>,
1414
#[serde(default)]
1515
pub server: ServerConfig,
16-
pub l2: Option<String>,
17-
pub l2_chain_id: Option<u64>,
16+
pub scroll_endpoint: Option<String>,
17+
pub scroll_chain_id: Option<u64>,
1818
#[serde(default = "default_l2_timeout_secs")]
1919
pub l2_timeout_secs: u64,
2020
}

0 commit comments

Comments
 (0)