Merge branch 'master' into geth-import
This commit is contained in:
@@ -34,6 +34,7 @@ igd = "0.4.2"
|
||||
ethcore-devtools = { path = "../devtools" }
|
||||
libc = "0.2.7"
|
||||
vergen = "0.1"
|
||||
target_info = "0.1"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
||||
@@ -108,6 +108,7 @@ extern crate igd;
|
||||
extern crate ethcore_devtools as devtools;
|
||||
extern crate libc;
|
||||
extern crate rustc_version;
|
||||
extern crate target_info;
|
||||
extern crate vergen;
|
||||
|
||||
pub mod standard;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
use std::fs::File;
|
||||
use common::*;
|
||||
use target_info::Target;
|
||||
use rustc_version;
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/version.rs"));
|
||||
@@ -68,5 +69,5 @@ pub fn contents(name: &str) -> Result<Bytes, UtilError> {
|
||||
|
||||
/// Get the standard version string for this software.
|
||||
pub fn version() -> String {
|
||||
format!("Parity/{}/{}-{}/{}/rustc{}", env!("CARGO_PKG_VERSION"), short_sha(), commit_date(), target(), rustc_version::version())
|
||||
format!("Parity//{}-{}-{}/{}-{}-{}/rustc{}", env!("CARGO_PKG_VERSION"), short_sha(), commit_date().replace("-", ""), Target::arch(), Target::os(), Target::env(), rustc_version::version())
|
||||
}
|
||||
@@ -276,9 +276,6 @@ impl Discovery {
|
||||
}
|
||||
|
||||
pub fn writable(&mut self) {
|
||||
if self.send_queue.is_empty() {
|
||||
return;
|
||||
}
|
||||
while !self.send_queue.is_empty() {
|
||||
let data = self.send_queue.pop_front().unwrap();
|
||||
match self.udp_socket.send_to(&data.payload, &data.address) {
|
||||
|
||||
@@ -163,7 +163,7 @@ impl Display for Node {
|
||||
impl FromStr for Node {
|
||||
type Err = UtilError;
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
let (id, endpoint) = if &s[0..8] == "enode://" && s.len() > 136 && &s[136..137] == "@" {
|
||||
let (id, endpoint) = if s.len() > 136 && &s[0..8] == "enode://" && &s[136..137] == "@" {
|
||||
(try!(NodeId::from_str(&s[8..136])), try!(NodeEndpoint::from_str(&s[137..])))
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user