Skip to content

Commit e61a3e2

Browse files
authored
Make MonitoringConfig optional (#49)
1 parent 58ba2d0 commit e61a3e2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/citrea_config/bitcoin.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ impl Default for MonitoringConfig {
55
Self {
66
check_interval: 1,
77
history_limit: 100,
8+
max_history_size: 1_000_000, // Default to 1mb for test
89
}
910
}
1011
}
@@ -13,6 +14,7 @@ impl Default for MonitoringConfig {
1314
pub struct MonitoringConfig {
1415
pub check_interval: u64,
1516
pub history_limit: usize,
17+
pub max_history_size: usize,
1618
}
1719

1820
/// Runtime configuration for the DA service
@@ -32,5 +34,5 @@ pub struct BitcoinServiceConfig {
3234
// absolute path to the directory where the txs will be written to
3335
pub tx_backup_dir: String,
3436

35-
pub monitoring: MonitoringConfig,
37+
pub monitoring: Option<MonitoringConfig>,
3638
}

src/citrea_config/rollup.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ impl Default for FullNodeConfig<BitcoinServiceConfig> {
154154
.into_path()
155155
.display()
156156
.to_string(),
157-
monitoring: MonitoringConfig::default(),
157+
monitoring: Some(MonitoringConfig::default()),
158158
},
159159
public_keys: RollupPublicKeys {
160160
sequencer_public_key: vec![
@@ -188,7 +188,7 @@ impl From<BitcoinConfig> for BitcoinServiceConfig {
188188
network: v.network,
189189
da_private_key: None,
190190
tx_backup_dir: String::new(),
191-
monitoring: Default::default(),
191+
monitoring: Some(Default::default()),
192192
}
193193
}
194194
}

0 commit comments

Comments
 (0)