Upgrade tarpc and tokio (#13293)

This commit is contained in:
Greg Fitzgerald
2020-10-29 19:21:18 -06:00
committed by GitHub
parent b5c8b86e7c
commit ca00197009
10 changed files with 269 additions and 130 deletions

View File

@@ -16,8 +16,8 @@ solana-banks-interface = { path = "../banks-interface", version = "1.5.0" }
solana-runtime = { path = "../runtime", version = "1.5.0" }
solana-sdk = { path = "../sdk", version = "1.5.0" }
solana-metrics = { path = "../metrics", version = "1.5.0" }
tarpc = { version = "0.22.0", features = ["full"] }
tokio = "0.2"
tarpc = { version = "0.23.0", features = ["full"] }
tokio = { version = "0.3", features = ["full"] }
tokio-serde = { version = "0.6", features = ["bincode"] }
[lib]

View File

@@ -38,7 +38,7 @@ use tarpc::{
server::{self, Channel, Handler},
transport,
};
use tokio::time::delay_for;
use tokio::time::sleep;
use tokio_serde::formats::Bincode;
#[derive(Clone)]
@@ -118,7 +118,7 @@ impl BanksServer {
.bank(commitment)
.get_signature_status_with_blockhash(signature, blockhash);
while status.is_none() {
delay_for(Duration::from_millis(200)).await;
sleep(Duration::from_millis(200)).await;
let bank = self.bank(commitment);
if bank.slot() > last_valid_slot {
break;