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

@ -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();
});