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
33
34
35
36
37
38
39
40
41
42
43
44
use fuel_chain_config::ChainConfig;
#[derive(Debug, Clone)]
pub struct Config {
pub max_tx: usize,
pub max_depth: usize,
pub min_gas_price: u64,
pub utxo_validation: bool,
pub chain_config: ChainConfig,
pub metrics: bool,
}
impl Default for Config {
fn default() -> Self {
let min_gas_price = 0;
let utxo_validation = true;
Self::new(ChainConfig::default(), min_gas_price, utxo_validation)
}
}
impl Config {
pub fn new(
chain_config: ChainConfig,
min_gas_price: u64,
utxo_validation: bool,
) -> Self {
Self {
max_tx: 4064,
max_depth: 10,
min_gas_price,
utxo_validation,
chain_config,
metrics: false,
}
}
}