1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use fuel_core_types::{
    fuel_tx::Input,
    fuel_types::Address,
};
use serde::{
    Deserialize,
    Serialize,
};

use crate as fuel_core_chain_config;
use fuel_core_chain_config::default_consensus_dev_key;

#[derive(Clone, Copy, Debug, Deserialize, Serialize, Eq, PartialEq)]
pub enum ConsensusConfig {
    PoA { signing_key: Address },
}

impl ConsensusConfig {
    pub fn default_poa() -> Self {
        ConsensusConfig::PoA {
            signing_key: Input::owner(&default_consensus_dev_key().public_key()),
        }
    }
}