Upgrade hyper to 0.14.11 (#9557)

* Upgrade hyper to 0.14.10

* fmt

* Enable required features
This commit is contained in:
Bastian Köcher
2021-08-13 20:31:40 +02:00
committed by GitHub
parent 7e9b8d278e
commit 1aadab917e
8 changed files with 70 additions and 198 deletions
+4 -4
View File
@@ -13,7 +13,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
bytes = "0.5"
bytes = "1.0"
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
hex = "0.4"
fnv = "1.0.6"
@@ -33,8 +33,8 @@ sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
threadpool = "1.7"
[target.'cfg(not(target_os = "unknown"))'.dependencies]
hyper = "0.13.9"
hyper-rustls = "0.21.0"
hyper = "0.14.11"
hyper-rustls = "0.22.1"
[dev-dependencies]
sc-client-db = { version = "0.10.0-dev", default-features = true, path = "../db" }
@@ -44,7 +44,7 @@ sc-transaction-pool-api = { version = "4.0.0-dev", path = "../transaction-pool/a
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
sp-consensus = { version = "0.10.0-dev", path = "../../primitives/consensus/common" }
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
tokio = "0.2"
tokio = "1.10"
lazy_static = "1.4.0"
[features]
+3 -3
View File
@@ -28,7 +28,7 @@
//! actively calling any function.
use crate::api::timestamp;
use bytes::buf::ext::{BufExt, Reader};
use bytes::buf::{Buf, Reader};
use fnv::FnvHashMap;
use futures::{channel::mpsc, future, prelude::*};
use hyper::{client, Body, Client as HyperClient};
@@ -51,7 +51,7 @@ pub struct SharedClient(Arc<HyperClient<HttpsConnector<client::HttpConnector>, B
impl SharedClient {
pub fn new() -> Self {
Self(Arc::new(HyperClient::builder().build(HttpsConnector::new())))
Self(Arc::new(HyperClient::builder().build(HttpsConnector::with_native_roots())))
}
}
@@ -719,7 +719,7 @@ mod tests {
let (addr_tx, addr_rx) = std::sync::mpsc::channel();
std::thread::spawn(move || {
let mut rt = tokio::runtime::Runtime::new().unwrap();
let rt = tokio::runtime::Runtime::new().unwrap();
let worker = rt.spawn(worker);
let server = rt.spawn(async move {
let server = hyper::Server::bind(&"127.0.0.1:0".parse().unwrap()).serve(