diff --git a/Cargo.lock b/Cargo.lock index 34b618c2b..8891e4658 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,7 +12,6 @@ dependencies = [ "ethcore-util 0.9.99", "ethsync 0.9.99", "fdlimit 0.1.0", - "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index f4163253b..5b59b26f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,8 +19,6 @@ ethcore-rpc = { path = "rpc", optional = true } fdlimit = { path = "util/fdlimit" } target_info = "0.1" daemonize = "0.2" -regex = "0.1" -lazy_static = "0.1" [features] default = ["rpc"] diff --git a/parity/main.rs b/parity/main.rs index aca2b9c03..0f1f77606 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -26,8 +26,6 @@ extern crate ethcore; extern crate ethsync; #[macro_use] extern crate log as rlog; -#[macro_use] -extern crate lazy_static; extern crate env_logger; extern crate ctrlc; extern crate fdlimit; @@ -40,11 +38,13 @@ extern crate ethcore_rpc as rpc; use std::net::{SocketAddr}; use std::env; +use std::from_str::FromStr; use std::process::exit; use rlog::{LogLevelFilter}; use env_logger::LogBuilder; use ctrlc::CtrlC; use util::*; +use util::network::node::Node; use util::panics::MayPanic; use ethcore::spec::*; use ethcore::client::*; @@ -194,13 +194,7 @@ impl Configuration { } fn normalize_enode(e: &str) -> Option { - lazy_static! { - static ref RE: Regex = Regex::new(r"^enode://([0-9a-fA-F]{64})@(\d+\.\d+\.\d+\.\d+):(\d+)$").unwrap(); - } - match RE.is_match(e) { - true => Some(e.to_owned()), - false => None, - } + Node::from_str(e).ok().map(|_| e.to_owned()) } fn init_nodes(&self, spec: &Spec) -> Vec {