Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
3487a93c
Unverified
Commit
3487a93c
authored
Aug 06, 2020
by
Pierre Krieger
Committed by
GitHub
Aug 06, 2020
Browse files
Companion PR to delaying network startup to after initialization (#1547)
parent
9c04ebb5
Pipeline
#103173
failed with stages
in 9 minutes and 16 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
node/service/src/lib.rs
View file @
3487a93c
...
...
@@ -335,7 +335,7 @@ fn new_full<RuntimeApi, Executor>(
let
finality_proof_provider
=
GrandpaFinalityProofProvider
::
new_for_service
(
backend
.clone
(),
client
.clone
());
let
(
network
,
network_status_sinks
,
system_rpc_tx
)
=
let
(
network
,
network_status_sinks
,
system_rpc_tx
,
network_starter
)
=
service
::
build_network
(
service
::
BuildNetworkParams
{
config
:
&
config
,
client
:
client
.clone
(),
...
...
@@ -512,6 +512,8 @@ fn new_full<RuntimeApi, Executor>(
)
?
;
}
network_starter
.start_network
();
Ok
((
task_manager
,
client
))
}
...
...
@@ -574,7 +576,7 @@ fn new_light<Runtime, Dispatch>(mut config: Configuration) -> Result<TaskManager
let
finality_proof_provider
=
GrandpaFinalityProofProvider
::
new_for_service
(
backend
.clone
(),
client
.clone
());
let
(
network
,
network_status_sinks
,
system_rpc_tx
)
=
let
(
network
,
network_status_sinks
,
system_rpc_tx
,
network_starter
)
=
service
::
build_network
(
service
::
BuildNetworkParams
{
config
:
&
config
,
client
:
client
.clone
(),
...
...
@@ -612,6 +614,8 @@ fn new_light<Runtime, Dispatch>(mut config: Configuration) -> Result<TaskManager
system_rpc_tx
,
})
?
;
network_starter
.start_network
();
Ok
(
task_manager
)
}
...
...
service/src/lib.rs
View file @
3487a93c
...
...
@@ -294,7 +294,7 @@ pub fn new_full<RuntimeApi, Executor>(
let
finality_proof_provider
=
GrandpaFinalityProofProvider
::
new_for_service
(
backend
.clone
(),
client
.clone
());
let
(
network
,
network_status_sinks
,
system_rpc_tx
)
=
let
(
network
,
network_status_sinks
,
system_rpc_tx
,
network_starter
)
=
service
::
build_network
(
service
::
BuildNetworkParams
{
config
:
&
config
,
client
:
client
.clone
(),
...
...
@@ -555,6 +555,8 @@ pub fn new_full<RuntimeApi, Executor>(
)
?
;
}
network_starter
.start_network
();
handles
.polkadot_network
=
Some
(
polkadot_network_service
);
Ok
((
task_manager
,
client
,
handles
,
network
,
rpc_handlers
))
}
...
...
@@ -620,7 +622,7 @@ fn new_light<Runtime, Dispatch>(mut config: Configuration) -> Result<(TaskManage
let
finality_proof_provider
=
GrandpaFinalityProofProvider
::
new_for_service
(
backend
.clone
(),
client
.clone
());
let
(
network
,
network_status_sinks
,
system_rpc_tx
)
=
let
(
network
,
network_status_sinks
,
system_rpc_tx
,
network_starter
)
=
service
::
build_network
(
service
::
BuildNetworkParams
{
config
:
&
config
,
client
:
client
.clone
(),
...
...
@@ -658,6 +660,8 @@ fn new_light<Runtime, Dispatch>(mut config: Configuration) -> Result<(TaskManage
system_rpc_tx
,
})
?
;
network_starter
.start_network
();
Ok
((
task_manager
,
rpc_handlers
))
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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