Revert "Upgrade in-tree tokio 0.2 usage to tokio 0.3 (#14326)"

This reverts commit 6c5be574c8.
This commit is contained in:
Michael Vines
2020-12-30 21:09:06 -08:00
parent c6b2eb07ee
commit ffd6f3e6bf
9 changed files with 75 additions and 60 deletions

View File

@@ -11,6 +11,7 @@ use std::{
},
time::Duration,
};
use tokio::time::delay_for;
// Attempt to upload this many blocks in parallel
const NUM_BLOCKS_TO_UPLOAD_IN_PARALLEL: usize = 32;
@@ -80,7 +81,7 @@ pub async fn upload_confirmed_blocks(
Err(err) => {
error!("get_confirmed_blocks for {} failed: {:?}", start_slot, err);
// Consider exponential backoff...
tokio::time::sleep(Duration::from_secs(2)).await;
delay_for(Duration::from_secs(2)).await;
}
}
};