From 6baad0e43c8a3f34b07db6e6ce0060cecc6ee998 Mon Sep 17 00:00:00 2001 From: debris Date: Wed, 3 Feb 2016 17:30:02 +0100 Subject: [PATCH 1/3] reveal surprise --- rpc/Cargo.toml | 1 + rpc/src/lib.rs | 1 + rpc/src/v1/impls/web3.rs | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 60b29c5d4..ccccc9a90 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -17,4 +17,5 @@ ethcore-util = { path = "../util" } ethcore = { path = "../ethcore" } ethsync = { path = "../sync" } clippy = "0.0.37" +target_info = "0.1.0" diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index f81e65551..985ba4674 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -4,6 +4,7 @@ #![plugin(serde_macros)] #![plugin(clippy)] +extern crate target_info; extern crate serde; extern crate serde_json; extern crate jsonrpc_core; diff --git a/rpc/src/v1/impls/web3.rs b/rpc/src/v1/impls/web3.rs index 5117ebf16..b010c1541 100644 --- a/rpc/src/v1/impls/web3.rs +++ b/rpc/src/v1/impls/web3.rs @@ -1,4 +1,5 @@ //! Web3 rpc implementation. +use target_info::Target; use jsonrpc_core::*; use v1::traits::Web3; @@ -13,8 +14,7 @@ impl Web3Client { impl Web3 for Web3Client { fn client_version(&self, params: Params) -> Result { match params { - //Params::None => Ok(Value::String("parity/0.1.0/-/rust1.7-nightly".to_owned())), - Params::None => Ok(Value::String("surprise/0.1.0/surprise/surprise".to_owned())), + Params::None => Ok(Value::String(format!("parity/0.9.0/{}/rust1.8-nightly", Target::os()).to_owned())), _ => Err(Error::invalid_params()) } } From c9670b00322075b299e804934bb746d03c33abf9 Mon Sep 17 00:00:00 2001 From: debris Date: Wed, 3 Feb 2016 17:35:25 +0100 Subject: [PATCH 2/3] use env package version --- rpc/Cargo.toml | 2 +- rpc/src/v1/impls/web3.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index ccccc9a90..bea85a74f 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Ethcore jsonrpc" name = "ethcore-rpc" -version = "0.1.0" +version = "0.9.0" license = "GPL-3.0" authors = ["Ethcore Result { match params { - Params::None => Ok(Value::String(format!("parity/0.9.0/{}/rust1.8-nightly", Target::os()).to_owned())), + Params::None => Ok(Value::String(format!("parity/{}/{}/rust1.8-nightly", env!("CARGO_PKG_VERSION"), Target::os()).to_owned())), _ => Err(Error::invalid_params()) } } From 0b3acf7b13d3a4fb54fbbc03790981168cc5a913 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Wed, 3 Feb 2016 17:58:22 +0100 Subject: [PATCH 3/3] Update web3.rs --- rpc/src/v1/impls/web3.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/src/v1/impls/web3.rs b/rpc/src/v1/impls/web3.rs index 846414186..e0c5c98ab 100644 --- a/rpc/src/v1/impls/web3.rs +++ b/rpc/src/v1/impls/web3.rs @@ -14,7 +14,7 @@ impl Web3Client { impl Web3 for Web3Client { fn client_version(&self, params: Params) -> Result { match params { - Params::None => Ok(Value::String(format!("parity/{}/{}/rust1.8-nightly", env!("CARGO_PKG_VERSION"), Target::os()).to_owned())), + Params::None => Ok(Value::String(format!("Parity/{}/{}-{}-{}", env!("CARGO_PKG_VERSION"), Target::arch(), Target::env(), Target::os()))), _ => Err(Error::invalid_params()) } }