use fuel_core_types::{
blockchain::primitives::SecretKeyWrapper,
secrecy::Secret,
};
use tokio::time::Duration;
#[derive(Debug, Clone)]
pub struct Config {
pub trigger: Trigger,
pub signing_key: Option<Secret<SecretKeyWrapper>>,
pub metrics: bool,
pub min_connected_reserved_peers: usize,
pub time_until_synced: Duration,
}
#[cfg(feature = "test-helpers")]
impl Default for Config {
fn default() -> Self {
Config {
trigger: Trigger::default(),
signing_key: None,
metrics: false,
min_connected_reserved_peers: 0,
time_until_synced: Duration::ZERO,
}
}
}
#[derive(Default, Clone, Copy, Debug, PartialEq, Eq)]
pub enum Trigger {
#[default]
Instant,
Never,
Interval { block_time: Duration },
}