Unverified Commit 9ee52bd4 authored by Bastian Köcher's avatar Bastian Köcher Committed by GitHub
Browse files

Offchain: Disable http requests (#4188)

We don't use any http requests in the polkadot offchain workers.
parent 60d3305e
Pipeline #164479 failed with stages
in 11 minutes and 48 seconds
This diff is collapsed.
......@@ -24,6 +24,7 @@ sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch
sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "master" }
service = { package = "sc-service", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
telemetry = { package = "sc-telemetry", git = "https://github.com/paritytech/substrate", branch = "master" }
......
......@@ -797,11 +797,21 @@ where
})?;
if config.offchain_worker.enabled {
let _ = service::build_offchain_workers(
&config,
task_manager.spawn_handle(),
let offchain_workers = Arc::new(sc_offchain::OffchainWorkers::new_with_options(
client.clone(),
network.clone(),
sc_offchain::OffchainWorkerOptions { enable_http_requests: false },
));
// Start the offchain workers to have
task_manager.spawn_handle().spawn(
"offchain-notifications",
sc_offchain::notification_future(
config.role.is_authority(),
client.clone(),
offchain_workers,
task_manager.spawn_handle().clone(),
network.clone(),
),
);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment