fuel_core_consensus_module/block_verifier/
config.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//! The config of the block verifier.

use fuel_core_chain_config::ConsensusConfig;
use fuel_core_types::{
    blockchain::primitives::DaBlockHeight,
    fuel_types::BlockHeight,
};

/// The config of the block verifier.
pub struct Config {
    /// The consensus config.
    pub consensus: ConsensusConfig,
    /// The block height of the genesis block.
    pub block_height: BlockHeight,
    /// The DA block height at genesis block.
    pub da_block_height: DaBlockHeight,
}

impl Config {
    /// Creates the verifier config for all possible consensuses.
    pub fn new(
        consensus: ConsensusConfig,
        block_height: BlockHeight,
        da_block_height: DaBlockHeight,
    ) -> Self {
        Self {
            consensus,
            block_height,
            da_block_height,
        }
    }
}