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
6e1a3d00
Unverified
Commit
6e1a3d00
authored
May 26, 2020
by
Gavin Wood
Committed by
GitHub
May 26, 2020
Browse files
Test CC1 spec (#1154)
* Test CC1 spec * Adaptive default chainspec
parent
df4b36cf
Pipeline
#94149
failed with stages
in 11 minutes and 27 seconds
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
cli/src/command.rs
View file @
6e1a3d00
...
...
@@ -20,6 +20,13 @@ use sc_executor::NativeExecutionDispatch;
use
sc_cli
::{
SubstrateCli
,
Result
};
use
crate
::
cli
::{
Cli
,
Subcommand
};
fn
get_exec_name
()
->
Option
<
String
>
{
std
::
env
::
current_exe
()
.ok
()
.and_then
(|
pb
|
pb
.file_name
()
.map
(|
s
|
s
.to_os_string
()))
.and_then
(|
s
|
s
.into_string
()
.ok
())
}
impl
SubstrateCli
for
Cli
{
fn
impl_name
()
->
&
'static
str
{
"Parity Polkadot"
}
...
...
@@ -36,6 +43,13 @@ impl SubstrateCli for Cli {
fn
executable_name
()
->
&
'static
str
{
"polkadot"
}
fn
load_spec
(
&
self
,
id
:
&
str
)
->
std
::
result
::
Result
<
Box
<
dyn
sc_service
::
ChainSpec
>
,
String
>
{
let
id
=
if
id
==
""
{
let
n
=
get_exec_name
()
.unwrap_or_default
();
[
"polkadot"
,
"kusama"
,
"westend"
]
.iter
()
.cloned
()
.find
(|
&
chain
|
n
.starts_with
(
chain
))
.unwrap_or
(
"polkadot"
)
}
else
{
id
};
Ok
(
match
id
{
"polkadot-dev"
|
"dev"
=>
Box
::
new
(
service
::
chain_spec
::
polkadot_development_config
()),
"polkadot-local"
=>
Box
::
new
(
service
::
chain_spec
::
polkadot_local_testnet_config
()),
...
...
@@ -45,7 +59,7 @@ impl SubstrateCli for Cli {
"kusama-staging"
=>
Box
::
new
(
service
::
chain_spec
::
kusama_staging_testnet_config
()),
"polkadot"
=>
Box
::
new
(
service
::
chain_spec
::
polkadot_config
()
?
),
"westend"
=>
Box
::
new
(
service
::
chain_spec
::
westend_config
()
?
),
"kusama"
|
""
=>
Box
::
new
(
service
::
chain_spec
::
kusama_config
()
?
),
"kusama"
=>
Box
::
new
(
service
::
chain_spec
::
kusama_config
()
?
),
"westend-dev"
=>
Box
::
new
(
service
::
chain_spec
::
westend_development_config
()),
"westend-local"
=>
Box
::
new
(
service
::
chain_spec
::
westend_local_testnet_config
()),
"westend-staging"
=>
Box
::
new
(
service
::
chain_spec
::
westend_staging_testnet_config
()),
...
...
runtime/polkadot/src/lib.rs
View file @
6e1a3d00
...
...
@@ -108,7 +108,7 @@ impl Filter<Call> for IsCallable {
fn
filter
(
call
:
&
Call
)
->
bool
{
match
call
{
Call
::
Parachains
(
parachains
::
Call
::
set_heads
(
..
))
=>
true
,
// Governance stuff
Call
::
Democracy
(
_
)
|
Call
::
Council
(
_
)
|
Call
::
TechnicalCommittee
(
_
)
|
Call
::
ElectionsPhragmen
(
_
)
|
Call
::
TechnicalMembership
(
_
)
|
Call
::
Treasury
(
_
)
|
...
...
service/res/polkadot.json
View file @
6e1a3d00
This diff is collapsed.
Click to expand it.
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