sync: unindent fetch task

This commit is contained in:
Henry de Valence 2020-07-21 15:40:00 -07:00
parent b722818e02
commit 928b0beb5d
1 changed files with 18 additions and 19 deletions

View File

@ -320,8 +320,7 @@ where
let mut retry_peer_set = self.block_network.clone();
let mut verifier = self.verifier.clone();
let span = tracing::info_span!("block_fetch_verify", ?hash);
self.pending_blocks.push(
tokio::spawn(async move {
let task = tokio::spawn(async move {
let block = match retry_peer_set
.ready_and()
.await?
@ -338,8 +337,8 @@ where
verifier.ready_and().await?.call(block).await
})
.instrument(span),
);
.instrument(span);
self.pending_blocks.push(task);
}
Ok(())