Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
9ee52bd4
Unverified
Commit
9ee52bd4
authored
Nov 03, 2021
by
Bastian Köcher
Committed by
GitHub
Nov 03, 2021
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
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Cargo.lock
View file @
9ee52bd4
This diff is collapsed.
Click to expand it.
node/service/Cargo.toml
View file @
9ee52bd4
...
...
@@ -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"
}
...
...
node/service/src/lib.rs
View file @
9ee52bd4
...
...
@@ -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
(),
),
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment