message: Extract the `fetch_from_peers()` function
diff: @@ -433,7 +433,24 @@ where
  );
  }
  - //-----------------------------------------------------
  + if let Some(value) = fetch_from_peers(new_peer_list, id, ctx).await {
  + return value;
  + }
  +
  + tokio::time::sleep(ctx.config.retry_interval()).await;
  + total_attempts += 1;
  + }
  +}
  +
  +async fn fetch_from_peers<REv, T>(
  + new_peer_list: Vec<NodeId>,
  + id: <T as Item>::Id,
  + ctx: &ChainSyncContext<'_, REv>,
  +) -> Option<Result<FetchedData<T>, FetchWithRetryError<T>>>
  +where
  + T: Item + CanUseSyncingNodes + 'static,
  + REv: From<FetcherRequest<T>> + From<NetworkInfoRequest>,
  +{
  for peer in new_peer_list {
  trace!(
  "attempting to fetch {:?} with id {:?} from {:?}",
  @@ -449,11 +466,11 @@ where
  id,
  peer
  );
  - return Ok(fetched_data);
  + return Some(Ok(fetched_data));
  }
  Ok(fetched_data @ FetchedData::FromPeer { .. }) => {
  trace!("fetched {:?} with id {:?} from {:?}", T::TAG, id, peer);
  - return Ok(fetched_data);
  + return Some(Ok(fetched_data));
  }
  Err(FetcherError::Absent { .. }) => {
  warn!(
  @@ -474,15 +491,11 @@ where
  ctx.mark_bad_peer(peer);
  }
  Err(error @ FetcherError::CouldNotConstructGetRequest { .. }) => {
  - return Err(error.into())
  + return Some(Err(error.into()))
  }
  }
  }
  - //----------------------------------------------------
  -
  - tokio::time::sleep(ctx.config.retry_interval()).await;
  - total_attempts += 1;
  - }
  + None
  }
  enum TrieAlreadyPresentOrDownloaded {
  