fix compilation errors
This commit is contained in:
parent
2ea45134ab
commit
ab4561b5bc
@ -157,11 +157,13 @@ impl Configuration {
|
|||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::BufRead;
|
use std::io::BufRead;
|
||||||
|
|
||||||
if let Some(ref path) = self.args.reserved_nodes {
|
if let Some(ref path) = self.args.flag_reserved_peers {
|
||||||
let node_file = File::open(path).unwrap_or_else(|e| {
|
let mut buffer = String::new();
|
||||||
|
let mut node_file = File::open(path).unwrap_or_else(|e| {
|
||||||
die!("Error opening reserved nodes file: {}", 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(|| {
|
Self::normalize_enode(s).unwrap_or_else(|| {
|
||||||
die!("{}: Invalid node address format given for a reserved node.", s);
|
die!("{}: Invalid node address format given for a reserved node.", s);
|
||||||
})
|
})
|
||||||
|
@ -312,6 +312,7 @@ fn execute_export(conf: Configuration) {
|
|||||||
boot_nodes: Vec::new(),
|
boot_nodes: Vec::new(),
|
||||||
use_secret: None,
|
use_secret: None,
|
||||||
ideal_peers: 0,
|
ideal_peers: 0,
|
||||||
|
reserved_nodes: Vec::new(),
|
||||||
};
|
};
|
||||||
let client_config = conf.client_config(&spec);
|
let client_config = conf.client_config(&spec);
|
||||||
|
|
||||||
@ -383,6 +384,7 @@ fn execute_import(conf: Configuration) {
|
|||||||
boot_nodes: Vec::new(),
|
boot_nodes: Vec::new(),
|
||||||
use_secret: None,
|
use_secret: None,
|
||||||
ideal_peers: 0,
|
ideal_peers: 0,
|
||||||
|
reserved_nodes: Vec::new(),
|
||||||
};
|
};
|
||||||
let client_config = conf.client_config(&spec);
|
let client_config = conf.client_config(&spec);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user