chore: make FetchClient Cloneable (#970)

This commit is contained in:
Matthias Seitz
2023-01-22 21:27:06 +01:00
committed by GitHub
parent a331b54bb0
commit d32710e1ea
2 changed files with 3 additions and 3 deletions

View File

@ -102,7 +102,7 @@ impl Command {
.start_network()
.await?;
let fetch_client = Arc::new(network.fetch_client().await?);
let fetch_client = network.fetch_client().await?;
let retries = self.retries.max(1);
let backoff = ConstantBackoff::default().with_max_times(retries);
@ -157,7 +157,7 @@ impl Command {
/// Get a single header from network
pub async fn get_single_header(
&self,
client: Arc<FetchClient>,
client: FetchClient,
id: BlockHashOrNumber,
) -> eyre::Result<SealedHeader> {
let request = HeadersRequest {