Skip to content

Commit

Permalink
Make MonitoringConfig optional in BitcoinServiceConfig FromEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
jfldde committed Jan 13, 2025
1 parent d694d41 commit 38c0242
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions crates/bitcoin-da/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,7 @@ impl citrea_common::FromEnv for BitcoinServiceConfig {
network: serde_json::from_str(&format!("\"{}\"", std::env::var("NETWORK")?))?,
da_private_key: std::env::var("DA_PRIVATE_KEY").ok(),
tx_backup_dir: std::env::var("TX_BACKUP_DIR")?,
monitoring: Some(MonitoringConfig {
check_interval: std::env::var("DA_MONITORING_CHECK_INTERVAL")?.parse()?,
history_limit: std::env::var("DA_MONITORING_HISTORY_LIMIT")?.parse()?,
max_history_size: std::env::var("DA_MONITORING_MAX_HISTORY_SIZE")?.parse()?,
}),
monitoring: MonitoringConfig::from_env().ok(),
mempool_space_url: std::env::var("MEMPOOL_SPACE_URL").ok(),
})
}
Expand Down

0 comments on commit 38c0242

Please sign in to comment.