Bump jsonrpc crates and remove old tokio (#18779)

* Bump jsonrpc crates and replace old tokio

* Bump tokio

* getBlockTime

* getBlocks

* getBlocksWithLimit, getInflationReward

* getBlock

* getFirstAvailableBlock

* getTransaction

* getSignaturesForAddress

* getSignatureStatuses

* Remove superfluous runtime
This commit is contained in:
Tyera Eulberg
2021-07-26 12:32:17 -06:00
committed by GitHub
parent b97113408b
commit 8596db8f53
12 changed files with 379 additions and 1039 deletions

View File

@ -74,8 +74,8 @@ solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.8.0" }
trees = "0.4.2"
[dev-dependencies]
jsonrpc-core = "17.1.0"
jsonrpc-core-client = { version = "17.1.0", features = ["ipc", "ws"] }
jsonrpc-core = "18.0.0"
jsonrpc-core-client = { version = "18.0.0", features = ["ipc", "ws"] }
matches = "0.1.6"
num_cpus = "1.13.0"
reqwest = { version = "0.11.4", default-features = false, features = ["blocking", "rustls-tls", "json"] }
@ -86,7 +86,7 @@ solana-version = { path = "../version", version = "=1.8.0" }
static_assertions = "1.1.0"
symlink = "0.1.0"
systemstat = "0.1.8"
tokio_02 = { version = "0.2", package = "tokio", features = ["full"] }
tokio = { version = "1", features = ["full"] }
[build-dependencies]
rustc_version = "0.4"

View File

@ -30,7 +30,7 @@ use std::{
thread::sleep,
time::{Duration, Instant},
};
use tokio_02::runtime::Runtime;
use tokio::runtime::Runtime;
macro_rules! json_req {
($method: expr, $params: expr) => {{
@ -169,7 +169,7 @@ fn test_rpc_slot_updates() {
let connect = ws::try_connect::<PubsubClient>(&rpc_pubsub_url).unwrap();
let client = connect.await.unwrap();
tokio_02::spawn(async move {
tokio::spawn(async move {
let mut update_sub = client.slots_updates_subscribe().unwrap();
loop {
let response = update_sub.next().await.unwrap();
@ -279,7 +279,7 @@ fn test_rpc_subscriptions() {
)
.unwrap_or_else(|err| panic!("sig sub err: {:#?}", err));
tokio_02::spawn(async move {
tokio::spawn(async move {
let response = sig_sub.next().await.unwrap();
status_sender
.send((sig.clone(), response.unwrap()))
@ -299,7 +299,7 @@ fn test_rpc_subscriptions() {
}),
)
.unwrap_or_else(|err| panic!("acct sub err: {:#?}", err));
tokio_02::spawn(async move {
tokio::spawn(async move {
let response = client_sub.next().await.unwrap();
account_sender.send(response.unwrap()).unwrap();
});
@ -309,7 +309,7 @@ fn test_rpc_subscriptions() {
let mut slot_sub = client
.slot_subscribe()
.unwrap_or_else(|err| panic!("sig sub err: {:#?}", err));
tokio_02::spawn(async move {
tokio::spawn(async move {
let _response = slot_sub.next().await.unwrap();
ready_sender.send(()).unwrap();
});