From 63adf39290493bf301d06c55e2d2b96205eb706e Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 18 Jan 2024 18:07:15 +0100 Subject: [PATCH] fix: enable tls feature correctly (#6120) --- Cargo.lock | 1 + crates/rpc/rpc/Cargo.toml | 4 +++- crates/rpc/rpc/src/eth/api/mod.rs | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 27b78da6fd..385b4927e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6573,6 +6573,7 @@ dependencies = [ "reth-consensus-common", "reth-interfaces", "reth-metrics", + "reth-network", "reth-network-api", "reth-primitives", "reth-provider", diff --git a/crates/rpc/rpc/Cargo.toml b/crates/rpc/rpc/Cargo.toml index 10b9fa50c6..169684b2ab 100644 --- a/crates/rpc/rpc/Cargo.toml +++ b/crates/rpc/rpc/Cargo.toml @@ -20,6 +20,7 @@ reth-rpc-types.workspace = true reth-provider = { workspace = true, features = ["test-utils"] } reth-transaction-pool = { workspace = true, features = ["test-utils"] } reth-network-api.workspace = true +reth-network.workspace = true reth-rpc-engine-api.workspace = true reth-revm = { workspace = true, features = ["js-tracer"] } reth-tasks.workspace = true @@ -47,7 +48,7 @@ hyper = "0.14.24" jsonwebtoken = "8" ## required for optimism sequencer delegation -reqwest = { version = "0.11", default-features = false, features = ["rustls"], optional = true } +reqwest = { version = "0.11", default-features = false, features = ["rustls-tls"], optional = true } # async async-trait.workspace = true @@ -87,6 +88,7 @@ optimism = [ "reth-primitives/optimism", "reth-rpc-types-compat/optimism", "reth-network-api/optimism", + "reth-network/optimism", "reth-provider/optimism", "reth-transaction-pool/optimism", ] diff --git a/crates/rpc/rpc/src/eth/api/mod.rs b/crates/rpc/rpc/src/eth/api/mod.rs index 7e2cd00f85..7a64a1930c 100644 --- a/crates/rpc/rpc/src/eth/api/mod.rs +++ b/crates/rpc/rpc/src/eth/api/mod.rs @@ -151,7 +151,7 @@ where blocking_task_pool, fee_history_cache, #[cfg(feature = "optimism")] - http_client: reqwest::Client::new(), + http_client: reqwest::Client::builder().use_rustls_tls().build().unwrap(), }; Self { inner: Arc::new(inner) }