mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 14:47:55 +00:00
Offchain: Disable http requests (#4188)
We don't use any http requests in the polkadot offchain workers.
This commit is contained in:
@@ -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(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user