fuel_core_consensus_module/
lib.rs

1//! Common traits and logic for managing the lifecycle of services
2#![deny(clippy::arithmetic_side_effects)]
3#![deny(clippy::cast_possible_truncation)]
4#![deny(unused_crate_dependencies)]
5#![deny(missing_docs)]
6#![deny(warnings)]
7
8use core::time::Duration;
9use fuel_core_types::blockchain::primitives::DaBlockHeight;
10
11pub mod block_verifier;
12
13/// Config for settings the consensus needs that are related to the relayer.
14#[derive(Clone, Debug)]
15pub struct RelayerConsensusConfig {
16    /// The maximum number of blocks that need to be synced before we start
17    /// awaiting relayer syncing.
18    pub max_da_lag: DaBlockHeight,
19    /// The maximum time to wait for the relayer to sync.
20    pub max_wait_time: Duration,
21}
22
23impl Default for RelayerConsensusConfig {
24    fn default() -> Self {
25        Self {
26            max_da_lag: 10u64.into(),
27            max_wait_time: Duration::from_secs(30),
28        }
29    }
30}