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
c67277ab
Commit
c67277ab
authored
Mar 24, 2020
by
Cecile Tonglet
Browse files
Adapt more code
parent
d675fe2a
Pipeline
#84417
failed with stage
in 11 minutes and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cli/src/command.rs
View file @
c67277ab
...
...
@@ -52,23 +52,10 @@ pub fn run() -> sc_cli::Result<()> {
};
match
opt
.subcommand
{
/*
None
=>
{
opt.run.base.init(&version)?;
opt.run.base.update_config(
&mut config,
|id| load_spec(id, force_kusama),
&version
)?;
let is_kusama = config.expect_chain_spec().is_kusama();
info!("{}", version.name);
info!(" version {}", config.full_version());
info!(" by {}, 2017-2020", version.author);
info!("Chain specification: {}", config.expect_chain_spec().name());
info!("Node name: {}", config.name);
info!("Roles: {}", config.display_role());
let
runtime
=
Cli
::
create_runtime
(
&
opt
.run.base
)
?
;
let
config
=
runtime
.config
();
let
is_kusama
=
config
.chain_spec
.is_kusama
();
if
is_kusama
{
info!
(
"Native runtime: {}"
,
service
::
KusamaExecutor
::
native_version
()
.runtime_version
);
...
...
@@ -78,22 +65,21 @@ pub fn run() -> sc_cli::Result<()> {
info!
(
" KUSAMA FOUNDATION "
);
info!
(
"----------------------------"
);
run_
service_until_exit
::<
run_
node
::
<
service
::
kusama_runtime
::
RuntimeApi
,
service
::
KusamaExecutor
,
service
::
kusama_runtime
::
UncheckedExtrinsic
,
>(
config
, opt.authority_discovery_enabled, grandpa_pause)
>
(
runtime
,
opt
.authority_discovery_enabled
,
grandpa_pause
)
}
else
{
info!
(
"Native runtime: {}"
,
service
::
PolkadotExecutor
::
native_version
()
.runtime_version
);
run_
service_until_exit
::<
run_
node
::
<
service
::
polkadot_runtime
::
RuntimeApi
,
service
::
PolkadotExecutor
,
service
::
polkadot_runtime
::
UncheckedExtrinsic
,
>(
config
, opt.authority_discovery_enabled, grandpa_pause)
>
(
runtime
,
opt
.authority_discovery_enabled
,
grandpa_pause
)
}
},
*/
Some
(
Subcommand
::
Base
(
subcommand
))
=>
{
let
runtime
=
Cli
::
create_runtime
(
&
subcommand
)
?
;
let
is_kusama
=
runtime
.config
()
.chain_spec
.is_kusama
();
...
...
@@ -141,7 +127,6 @@ pub fn run() -> sc_cli::Result<()> {
})
}
},
_
=>
todo!
(),
}
}
...
...
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