From ae4a48d00f2f073dbac46a6ad16353c750de2e73 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Tue, 16 Mar 2021 15:32:50 -0600 Subject: [PATCH] Bump tokio to 1.1 (#15926) (cherry picked from commit 654449ce91fc46d3a337b47ab3e4b588c245d8d8) --- Cargo.lock | 42 ++--------------------------------- ledger/Cargo.toml | 3 ++- ledger/src/bigtable_upload.rs | 2 +- 3 files changed, 5 insertions(+), 42 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d8f8c3dcaf5dd7..98fe78176be0aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -473,12 +473,6 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" -[[package]] -name = "bytes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0dcbc35f504eb6fc275a6d20e4ebcda18cf50d40ba6fabff8c711fa16cb3b16" - [[package]] name = "bytes" version = "1.0.1" @@ -4730,7 +4724,8 @@ dependencies = [ "solana-vote-program", "tempfile", "thiserror", - "tokio 0.3.5", + "tokio 1.1.1", + "tokio-stream", "trees", ] @@ -6089,28 +6084,6 @@ dependencies = [ "winapi 0.3.8", ] -[[package]] -name = "tokio" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12a3eb39ee2c231be64487f1fcbe726c8f2514876a55480a5ab8559fc374252" -dependencies = [ - "autocfg 1.0.0", - "bytes 0.6.0", - "futures-core", - "lazy_static", - "libc", - "memchr 2.3.3", - "mio 0.7.6", - "num_cpus", - "parking_lot 0.11.0", - "pin-project-lite 0.2.4", - "signal-hook-registry", - "slab", - "tokio-macros 0.3.1", - "winapi 0.3.8", -] - [[package]] name = "tokio" version = "1.1.1" @@ -6195,17 +6168,6 @@ dependencies = [ "syn 1.0.60", ] -[[package]] -name = "tokio-macros" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21d30fdbb5dc2d8f91049691aa1a9d4d4ae422a21c334ce8936e5886d30c5c45" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.6", - "syn 1.0.60", -] - [[package]] name = "tokio-macros" version = "1.0.0" diff --git a/ledger/Cargo.toml b/ledger/Cargo.toml index 7597507b6a0172..42b92800fd8203 100644 --- a/ledger/Cargo.toml +++ b/ledger/Cargo.toml @@ -52,7 +52,8 @@ solana-storage-proto = { path = "../storage-proto", version = "=1.6.1" } solana-vote-program = { path = "../programs/vote", version = "=1.6.1" } tempfile = "3.1.0" thiserror = "1.0" -tokio = { version = "0.3", features = ["full"] } +tokio = { version = "1.1", features = ["full"] } +tokio-stream = "0.1" trees = "0.2.1" [dependencies.rocksdb] diff --git a/ledger/src/bigtable_upload.rs b/ledger/src/bigtable_upload.rs index eee5bb1a49d4ba..24c3c9080ee8a0 100644 --- a/ledger/src/bigtable_upload.rs +++ b/ledger/src/bigtable_upload.rs @@ -168,7 +168,7 @@ pub async fn upload_confirmed_blocks( use futures::stream::StreamExt; let mut stream = - tokio::stream::iter(receiver.into_iter()).chunks(NUM_BLOCKS_TO_UPLOAD_IN_PARALLEL); + tokio_stream::iter(receiver.into_iter()).chunks(NUM_BLOCKS_TO_UPLOAD_IN_PARALLEL); while let Some(blocks) = stream.next().await { if exit.load(Ordering::Relaxed) {