From 99296f310cbe0b96c0d879e6298d37725818bdb4 Mon Sep 17 00:00:00 2001 From: Aiden McClelland Date: Mon, 16 Jul 2018 17:22:04 -0600 Subject: [PATCH 1/5] Update response.rs --- core/src/response.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/response.rs b/core/src/response.rs index a7cf434..52e65f6 100644 --- a/core/src/response.rs +++ b/core/src/response.rs @@ -19,10 +19,10 @@ where { let response: Output = serde_json::from_slice(response_raw) .chain_err(|| ErrorKind::ResponseError("Not valid json"))?; - ensure!( + /*ensure!( response.version() == Some(Version::V2), ErrorKind::ResponseError("Not JSON-RPC 2.0 compatible") - ); + );*/ ensure!( response.id() == expected_id, ErrorKind::ResponseError("Response id not equal to request id") From 409a624f358308b5dbcb9946974a35642b6155d8 Mon Sep 17 00:00:00 2001 From: Aiden McClelland Date: Mon, 16 Jul 2018 17:59:53 -0600 Subject: [PATCH 2/5] Update response.rs --- core/src/response.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/response.rs b/core/src/response.rs index 52e65f6..52b3b6c 100644 --- a/core/src/response.rs +++ b/core/src/response.rs @@ -29,7 +29,7 @@ where ); match response { Output::Success(success) => { - trace!("Received json result: {}", success.result); + println!("Received json result: {}", success.result); serde_json::from_value(success.result) .chain_err(|| ErrorKind::ResponseError("Not valid for target type")) } From b6c8cc944593ab9c1f54b79a56eafbcc69fe77dc Mon Sep 17 00:00:00 2001 From: Aiden McClelland Date: Mon, 16 Jul 2018 18:02:03 -0600 Subject: [PATCH 3/5] Update response.rs --- core/src/response.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/response.rs b/core/src/response.rs index 52b3b6c..52e65f6 100644 --- a/core/src/response.rs +++ b/core/src/response.rs @@ -29,7 +29,7 @@ where ); match response { Output::Success(success) => { - println!("Received json result: {}", success.result); + trace!("Received json result: {}", success.result); serde_json::from_value(success.result) .chain_err(|| ErrorKind::ResponseError("Not valid for target type")) } From 942e99d8a0158b4b85dd0286a4a9f6740cb805cd Mon Sep 17 00:00:00 2001 From: Aiden McClelland Date: Thu, 13 Sep 2018 10:51:33 -0600 Subject: [PATCH 4/5] Update response.rs --- core/src/response.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/response.rs b/core/src/response.rs index 52e65f6..a34ebe9 100644 --- a/core/src/response.rs +++ b/core/src/response.rs @@ -19,10 +19,11 @@ where { let response: Output = serde_json::from_slice(response_raw) .chain_err(|| ErrorKind::ResponseError("Not valid json"))?; - /*ensure!( + #[cfg(not(feature = "disable_version_check"))] + ensure!( response.version() == Some(Version::V2), ErrorKind::ResponseError("Not JSON-RPC 2.0 compatible") - );*/ + ); ensure!( response.id() == expected_id, ErrorKind::ResponseError("Response id not equal to request id") From bc2d4120247c6a54dedb9e1da6011392cc58d744 Mon Sep 17 00:00:00 2001 From: Aiden McClelland Date: Mon, 17 Sep 2018 10:24:02 -0600 Subject: [PATCH 5/5] Update Cargo.toml --- core/Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/Cargo.toml b/core/Cargo.toml index b01c157..b555229 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -17,6 +17,8 @@ log = "0.4" serde = "1.0" serde_json = "1.0" +[features] +disable_version_check = [] [badges] travis-ci = { repository = "mullvad/jsonrpc-client-rs" }