parity-zcash/p2p/src/config.rs

27 lines
883 B
Rust
Raw Normal View History

use message::common::Services;
2016-10-04 03:33:23 -07:00
use net::Config as NetConfig;
2019-06-28 14:27:46 -07:00
use std::{net, path};
use util::InternetProtocol;
2016-10-04 03:33:23 -07:00
#[derive(Debug, Clone)]
2016-10-04 03:33:23 -07:00
pub struct Config {
2019-06-28 14:27:46 -07:00
/// Number of threads used by p2p thread pool.
pub threads: usize,
/// Number of inbound connections.
pub inbound_connections: u32,
/// Number of outbound connections.
pub outbound_connections: u32,
/// Configuration for every connection.
pub connection: NetConfig,
/// Connect only to these nodes.
pub peers: Vec<net::SocketAddr>,
/// Connect to these nodes to retrieve peer addresses, and disconnect.
pub seeds: Vec<String>,
/// p2p/nodes.csv file path.
pub node_table_path: path::PathBuf,
/// Peers with these services will get a boost in node_table.
pub preferable_services: Services,
/// Internet protocol.
pub internet_protocol: InternetProtocol,
2016-10-04 03:33:23 -07:00
}