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" } diff --git a/core/src/response.rs b/core/src/response.rs index a7cf434..a34ebe9 100644 --- a/core/src/response.rs +++ b/core/src/response.rs @@ -19,6 +19,7 @@ where { let response: Output = serde_json::from_slice(response_raw) .chain_err(|| ErrorKind::ResponseError("Not valid json"))?; + #[cfg(not(feature = "disable_version_check"))] ensure!( response.version() == Some(Version::V2), ErrorKind::ResponseError("Not JSON-RPC 2.0 compatible")