2016-10-04 03:33:23 -07:00
|
|
|
use std::net::IpAddr;
|
|
|
|
use net::Config as NetConfig;
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct Config {
|
2016-10-17 16:44:52 -07:00
|
|
|
/// Number of threads used by p2p thread pool.
|
|
|
|
pub threads: usize,
|
|
|
|
/// Lowest supported protocol version.
|
|
|
|
pub protocol_minimum: u32,
|
|
|
|
/// Highest supported protocol version.
|
|
|
|
pub protocol_maximum: u32,
|
|
|
|
/// Number of inbound connections.
|
|
|
|
pub inbound_connections: usize,
|
|
|
|
/// Number of outbound connections.
|
|
|
|
pub outbound_connections: usize,
|
2016-10-04 03:33:23 -07:00
|
|
|
/// Configuration for every connection.
|
|
|
|
pub connection: NetConfig,
|
|
|
|
/// Connect only ot these nodes.
|
2016-10-17 16:44:52 -07:00
|
|
|
pub peers: Vec<IpAddr>,
|
|
|
|
/// Connect to these nodes to retrieve peer addresses, and disconnect.
|
2016-10-25 00:55:43 -07:00
|
|
|
pub seeds: Vec<String>,
|
2016-10-04 03:33:23 -07:00
|
|
|
}
|