From ab4561b5bcfcd76ff1e1fa133fd4926fa52d9d14 Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Sun, 19 Jun 2016 21:34:02 +0200 Subject: [PATCH] fix compilation errors --- parity/configuration.rs | 8 +++++--- parity/main.rs | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/parity/configuration.rs b/parity/configuration.rs index 666eabdda..e2a8f94b6 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -157,11 +157,13 @@ impl Configuration { use std::fs::File; use std::io::BufRead; - if let Some(ref path) = self.args.reserved_nodes { - let node_file = File::open(path).unwrap_or_else(|e| { + if let Some(ref path) = self.args.flag_reserved_peers { + let mut buffer = String::new(); + let mut node_file = File::open(path).unwrap_or_else(|e| { die!("Error opening reserved nodes file: {}", e); }); - node_file.lines().map(|s| { + node_file.read_to_string(&mut buffer).expect("Error reading reserved node file"); + buffer.lines().map(|s| { Self::normalize_enode(s).unwrap_or_else(|| { die!("{}: Invalid node address format given for a reserved node.", s); }) diff --git a/parity/main.rs b/parity/main.rs index cfa44f6ee..d5e61a842 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -312,6 +312,7 @@ fn execute_export(conf: Configuration) { boot_nodes: Vec::new(), use_secret: None, ideal_peers: 0, + reserved_nodes: Vec::new(), }; let client_config = conf.client_config(&spec); @@ -383,6 +384,7 @@ fn execute_import(conf: Configuration) { boot_nodes: Vec::new(), use_secret: None, ideal_peers: 0, + reserved_nodes: Vec::new(), }; let client_config = conf.client_config(&spec);