config.rs 885 B
Newer Older
use message::common::Services;
Marek Kotewicz's avatar
Marek Kotewicz committed
use net::Config as NetConfig;
use util::InternetProtocol;
Marek Kotewicz's avatar
Marek Kotewicz committed
pub struct Config {
Marek Kotewicz's avatar
Marek Kotewicz committed
	/// Number of threads used by p2p thread pool.
	pub threads: usize,
	/// Number of inbound connections.
	pub inbound_connections: u32,
Marek Kotewicz's avatar
Marek Kotewicz committed
	/// Number of outbound connections.
	pub outbound_connections: u32,
Marek Kotewicz's avatar
Marek Kotewicz committed
	/// Configuration for every connection.
	pub connection: NetConfig,
Sun's avatar
Sun committed
	/// Connect only to these nodes.
	pub peers: Vec<net::SocketAddr>,
Marek Kotewicz's avatar
Marek Kotewicz committed
	/// 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 this services will get a boost in node_table.
	pub preferable_services: Services,
	/// Internet protocol.
	pub internet_protocol: InternetProtocol,
Svyatoslav Nikolsky's avatar
Svyatoslav Nikolsky committed
	/// Serialization flags.
	pub serialization_flags: u32,
Marek Kotewicz's avatar
Marek Kotewicz committed
}