cfxcore/consensus/pivot_hint/config.rs
1use crate::hash::H256;
2
3/// Configuration for initializing PivotHint.
4#[derive(Clone)]
5pub struct PivotHintConfig {
6 /// Path to the pivot hint file
7 pub file_path: String,
8
9 /// Expected keccak hash of the Page Digests Part
10 pub checksum: H256,
11}
12
13impl PivotHintConfig {
14 pub fn new(file_path: &str, checksum: H256) -> Self {
15 Self {
16 file_path: file_path.to_string(),
17 checksum,
18 }
19 }
20}