Skip to content

Commit

Permalink
substrate-offchain: upgrade hyper to v1
Browse files Browse the repository at this point in the history
  • Loading branch information
ShoyuVanilla committed Oct 7, 2024
1 parent fe0bfb7 commit 34275f1
Show file tree
Hide file tree
Showing 6 changed files with 184 additions and 120 deletions.
84 changes: 51 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 21 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,13 @@ default-members = [
[workspace.lints.rust]
suspicious_double_ref_op = { level = "allow", priority = 2 }
# `substrate_runtime` is a common `cfg` condition name used in the repo.
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(build_opt_level, values("3"))', 'cfg(build_profile, values("debug", "release"))', 'cfg(enable_alloc_error_handler)', 'cfg(fuzzing)', 'cfg(substrate_runtime)'] }
unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(build_opt_level, values("3"))',
'cfg(build_profile, values("debug", "release"))',
'cfg(enable_alloc_error_handler)',
'cfg(fuzzing)',
'cfg(substrate_runtime)',
] }

[workspace.lints.clippy]
all = { level = "allow", priority = 0 }
Expand Down Expand Up @@ -797,10 +803,15 @@ http = { version = "1.1" }
http-body = { version = "1", default-features = false }
http-body-util = { version = "0.1.2", default-features = false }
hyper = { version = "1.3.1", default-features = false }
hyper-rustls = { version = "0.24.2" }
hyper-rustls = { version = "0.27.3", default-features = false, features = [
"http1",
"http2",
"logging",
"ring",
"rustls-native-certs",
"tls12",
] }
hyper-util = { version = "0.1.5", default-features = false }
# TODO: remove hyper v0.14 https://github.com/paritytech/polkadot-sdk/issues/4896
hyperv14 = { package = "hyper", version = "0.14.29", default-features = false }
impl-serde = { version = "0.4.0", default-features = false }
impl-trait-for-tuples = { version = "0.2.2" }
indexmap = { version = "2.0.0" }
Expand Down Expand Up @@ -1115,6 +1126,12 @@ rstest = { version = "0.18.2" }
rustc-hash = { version = "1.1.0" }
rustc-hex = { version = "2.1.0", default-features = false }
rustix = { version = "0.36.7", default-features = false }
rustls = { version = "0.23.14", default-features = false, features = [
"logging",
"ring",
"std",
"tls12",
] }
rustversion = { version = "1.0.17" }
rusty-fork = { version = "0.3.0", default-features = false }
safe-mix = { version = "1.0", default-features = false }
Expand Down
8 changes: 4 additions & 4 deletions substrate/client/offchain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ codec = { features = ["derive"], workspace = true, default-features = true }
fnv = { workspace = true }
futures = { workspace = true }
futures-timer = { workspace = true }
hyperv14 = { features = [
"http2",
"stream",
], workspace = true, default-features = true }
http-body-util = { workspace = true }
hyper = { features = ["http2"], workspace = true, default-features = true }
hyper-rustls = { features = ["http2"], workspace = true }
hyper-util = { features = ["client-legacy"], workspace = true }
num_cpus = { workspace = true }
once_cell = { workspace = true }
parking_lot = { workspace = true, default-features = true }
rand = { workspace = true, default-features = true }
rustls = { workspace = true }
threadpool = { workspace = true }
tracing = { workspace = true, default-features = true }
sc-client-api = { workspace = true, default-features = true }
Expand Down
2 changes: 1 addition & 1 deletion substrate/client/offchain/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ mod tests {
fn offchain_api() -> (Api, AsyncApi) {
sp_tracing::try_init_simple();
let mock = Arc::new(TestNetwork());
let shared_client = SharedClient::new();
let shared_client = SharedClient::new().unwrap();

AsyncApi::new(mock, false, shared_client)
}
Expand Down
Loading

0 comments on commit 34275f1

Please sign in to comment.