fuel_core_consensus_module/block_verifier/
config.rs

1//! The config of the block verifier.
2
3use fuel_core_chain_config::ConsensusConfig;
4use fuel_core_types::{
5    blockchain::primitives::DaBlockHeight,
6    fuel_types::BlockHeight,
7};
8
9/// The config of the block verifier.
10pub struct Config {
11    /// The consensus config.
12    pub consensus: ConsensusConfig,
13    /// The block height of the genesis block.
14    pub block_height: BlockHeight,
15    /// The DA block height at genesis block.
16    pub da_block_height: DaBlockHeight,
17}
18
19impl Config {
20    /// Creates the verifier config for all possible consensuses.
21    pub fn new(
22        consensus: ConsensusConfig,
23        block_height: BlockHeight,
24        da_block_height: DaBlockHeight,
25    ) -> Self {
26        Self {
27            consensus,
28            block_height,
29            da_block_height,
30        }
31    }
32}