cfxcore/light_protocol/
config.rs

1// Copyright 2020 Conflux Foundation. All rights reserved.
2// Conflux is free software and distributed under GNU General Public License.
3// See http://www.gnu.org/licenses/
4
5use std::time::Duration;
6
7#[derive(Clone)]
8pub struct Configuration {
9    // header sync parameters
10    pub header_request_batch_size: Option<usize>,
11    pub header_request_timeout: Option<Duration>,
12    pub max_headers_in_flight: Option<usize>,
13
14    // epoch sync parameters
15    pub epoch_request_batch_size: Option<usize>,
16    pub epoch_request_timeout: Option<Duration>,
17    pub max_parallel_epochs_to_request: Option<usize>,
18    pub num_epochs_to_request: Option<usize>,
19    pub num_waiting_headers_threshold: Option<usize>,
20}