mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 13:17:56 +00:00
Offchain: Disable http requests (#4188)
We don't use any http requests in the polkadot offchain workers.
This commit is contained in:
Generated
+171
-161
File diff suppressed because it is too large
Load Diff
@@ -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(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user