Skip to content

Commit aa5c3c2

Browse files
Add the config disabled verifiers to the batcher struct
1 parent d59877f commit aa5c3c2

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

crates/batcher/src/lib.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ pub struct Batcher {
134134

135135
disabled_verifiers: Mutex<U256>,
136136

137+
// The list of disabled verifiers from the config file. Note that this is separate from the
138+
// contract's disabled verifiers, and is updated only when the batcher is restarted.
139+
config_disabled_verifiers: Vec<String>,
140+
137141
// Observability and monitoring
138142
pub metrics: metrics::BatcherMetrics,
139143
pub telemetry: TelemetrySender,
@@ -298,12 +302,14 @@ impl Batcher {
298302
None
299303
};
300304

301-
let disabled_verifiers = match service_manager.disabled_verifiers().call().await {
302-
Ok(disabled_verifiers) => Ok(disabled_verifiers),
305+
let contract_disabled_verifiers = match service_manager.disabled_verifiers().call().await {
306+
Ok(contract_disabled_verifiers) => Ok(contract_disabled_verifiers),
303307
Err(_) => service_manager_fallback.disabled_verifiers().call().await,
304308
}
305309
.expect("Failed to get disabled verifiers");
306310

311+
let config_disabled_verifiers = config.batcher.disabled_verifiers.clone();
312+
307313
let telemetry = TelemetrySender::new(format!(
308314
"http://{}",
309315
config.batcher.telemetry_ip_port_address
@@ -347,7 +353,8 @@ impl Batcher {
347353
posting_batch: Mutex::new(false),
348354
batch_state: Mutex::new(batch_state),
349355
user_states,
350-
disabled_verifiers: Mutex::new(disabled_verifiers),
356+
disabled_verifiers: Mutex::new(contract_disabled_verifiers),
357+
config_disabled_verifiers: config_disabled_verifiers,
351358
current_min_max_fee: RwLock::new(U256::zero()),
352359
metrics,
353360
telemetry,

0 commit comments

Comments
 (0)