Merge branch 'master' of github.com:ethcore/parity into jsonrpc2

This commit is contained in:
debris
2016-02-22 08:50:03 +01:00
52 changed files with 2298 additions and 874 deletions

View File

@@ -17,7 +17,6 @@ ethcore-util = { path = "../util" }
ethcore = { path = "../ethcore" }
ethsync = { path = "../sync" }
clippy = { version = "0.0.42", optional = true }
target_info = "0.1.0"
rustc-serialize = "0.3"
serde_macros = { version = "0.6.13", optional = true }

View File

@@ -20,7 +20,6 @@
#![cfg_attr(nightly, plugin(serde_macros, clippy))]
extern crate rustc_serialize;
extern crate target_info;
extern crate serde;
extern crate serde_json;
extern crate jsonrpc_core;

View File

@@ -15,8 +15,8 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
//! Web3 rpc implementation.
use target_info::Target;
use jsonrpc_core::*;
use util::version;
use v1::traits::Web3;
/// Web3 rpc implementation.
@@ -30,7 +30,9 @@ impl Web3Client {
impl Web3 for Web3Client {
fn client_version(&self, params: Params) -> Result<Value, Error> {
match params {
Params::None => Ok(Value::String(format!("Parity/-/{}/{}-{}-{}/rust1.8-nightly", env!("CARGO_PKG_VERSION"), Target::arch(), Target::env(), Target::os()))),
Params::None => {
Ok(Value::String(version())),
}
_ => Err(Error::invalid_params())
}
}