lighthouse/beacon_node/rpc/src/config.rs

23 lines
515 B
Rust
Raw Normal View History

2019-03-19 13:01:00 +00:00
use std::net::Ipv4Addr;
/// RPC Configuration
#[derive(Debug, Clone)]
pub struct Config {
/// Enable the RPC server.
pub enabled: bool,
/// The IPv4 address the RPC will listen on.
pub listen_address: Ipv4Addr,
/// The port the RPC will listen on.
pub port: u16,
}
impl Default for Config {
fn default() -> Self {
Config {
enabled: false, // rpc disabled by default
listen_address: Ipv4Addr::new(127, 0, 0, 1),
port: 5051,
}
}
}