Prune some duplicated dependencies in the dep graph (#11433)

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
Qinxuan Chen
2022-05-18 15:23:15 +08:00
committed by GitHub
parent 74428fa8ac
commit fe4acb7924
11 changed files with 36 additions and 146 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ futures = "0.3.21"
futures-timer = "3.0.2"
hex = "0.4"
hyper = { version = "0.14.16", features = ["stream", "http2"] }
hyper-rustls = "0.22.1"
hyper-rustls = { version = "0.23.0", features = ["http2"] }
num_cpus = "1.13"
once_cell = "1.8"
parking_lot = "0.12.0"
+8 -2
View File
@@ -32,7 +32,7 @@ use bytes::buf::{Buf, Reader};
use fnv::FnvHashMap;
use futures::{channel::mpsc, future, prelude::*};
use hyper::{client, Body, Client as HyperClient};
use hyper_rustls::HttpsConnector;
use hyper_rustls::{HttpsConnector, HttpsConnectorBuilder};
use once_cell::sync::Lazy;
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
use sp_core::offchain::{HttpError, HttpRequestId, HttpRequestStatus, Timestamp};
@@ -53,7 +53,13 @@ pub struct SharedClient(Arc<Lazy<HyperClient<HttpsConnector<client::HttpConnecto
impl SharedClient {
pub fn new() -> Self {
Self(Arc::new(Lazy::new(|| {
HyperClient::builder().build(HttpsConnector::with_native_roots())
let connector = HttpsConnectorBuilder::new()
.with_native_roots()
.https_or_http()
.enable_http1()
.enable_http2()
.build();
HyperClient::builder().build(connector)
})))
}
}