1use fuel_core_types::{
2 fuel_types::ChainId,
3 signer::SignMode,
4};
5use tokio::time::Duration;
6
7#[derive(Debug, Clone)]
8pub struct Config {
9 pub trigger: Trigger,
10 pub signer: SignMode,
11 pub metrics: bool,
12 pub min_connected_reserved_peers: usize,
13 pub time_until_synced: Duration,
14 pub production_timeout: Duration,
15 pub chain_id: ChainId,
16}
17
18#[cfg(feature = "test-helpers")]
19impl Default for Config {
20 fn default() -> Self {
21 Config {
22 trigger: Trigger::default(),
23 signer: SignMode::Unavailable,
24 metrics: false,
25 min_connected_reserved_peers: 0,
26 time_until_synced: Duration::ZERO,
27 production_timeout: Duration::from_secs(20),
28 chain_id: ChainId::default(),
29 }
30 }
31}
32
33#[derive(Default, Clone, Copy, Debug, PartialEq, Eq)]
35pub enum Trigger {
36 #[default]
39 Instant,
40 Never,
42 Interval { block_time: Duration },
44 Open { period: Duration },
47}