Upgrade in-tree tokio 0.2 usage to tokio 0.3

This commit is contained in:
Michael Vines
2020-12-28 17:56:54 -08:00
parent 3f10fb993b
commit 444ed768dc
9 changed files with 60 additions and 75 deletions

View File

@ -11,7 +11,6 @@ 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;
@ -81,7 +80,7 @@ pub async fn upload_confirmed_blocks(
Err(err) => {
error!("get_confirmed_blocks for {} failed: {:?}", start_slot, err);
// Consider exponential backoff...
delay_for(Duration::from_secs(2)).await;
tokio::time::sleep(Duration::from_secs(2)).await;
}
}
};