Upgrade jsonrpc crates to v17.0.0 (#15018)
* Upgrade to jsonrpc 17.0.0 * Fix test * tree Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
@@ -14,7 +14,7 @@ bincode = "1.3.1"
|
||||
bs58 = "0.3.1"
|
||||
clap = "2.33.0"
|
||||
indicatif = "0.15.0"
|
||||
jsonrpc-core = "15.0.0"
|
||||
jsonrpc-core = "17.0.0"
|
||||
log = "0.4.11"
|
||||
net2 = "0.2.37"
|
||||
rayon = "1.5.0"
|
||||
@@ -36,8 +36,7 @@ url = "2.1.1"
|
||||
|
||||
[dev-dependencies]
|
||||
assert_matches = "1.3.0"
|
||||
jsonrpc-core = "15.0.0"
|
||||
jsonrpc-http-server = "15.0.0"
|
||||
jsonrpc-http-server = "17.0.0"
|
||||
solana-logger = { path = "../logger", version = "1.6.0" }
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
|
@@ -1569,7 +1569,7 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::{client_error::ClientErrorKind, mock_sender::PUBKEY};
|
||||
use assert_matches::assert_matches;
|
||||
use jsonrpc_core::{Error, IoHandler, Params};
|
||||
use jsonrpc_core::{futures::prelude::*, Error, IoHandler, Params};
|
||||
use jsonrpc_http_server::{AccessControlAllowOrigin, DomainsValidation, ServerBuilder};
|
||||
use serde_json::Number;
|
||||
use solana_sdk::{
|
||||
@@ -1586,14 +1586,14 @@ mod tests {
|
||||
let mut io = IoHandler::default();
|
||||
// Successful request
|
||||
io.add_method("getBalance", |_params: Params| {
|
||||
Ok(Value::Number(Number::from(50)))
|
||||
future::ok(Value::Number(Number::from(50)))
|
||||
});
|
||||
// Failed request
|
||||
io.add_method("getRecentBlockhash", |params: Params| {
|
||||
if params != Params::None {
|
||||
Err(Error::invalid_request())
|
||||
future::err(Error::invalid_request())
|
||||
} else {
|
||||
Ok(Value::String(
|
||||
future::ok(Value::String(
|
||||
"deadbeefXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNHhx".to_string(),
|
||||
))
|
||||
}
|
||||
|
Reference in New Issue
Block a user