Support build-spec for other chains than Polkadot (#1567)

* Support `build-spec` for other chains than Polkadot

The problem when building a chain specification is that you require the
native runtime to parse the json file (assuming the chain spec is not
raw yet). Before this pr we could only overwrite the native runtime when
running the node using `force_*`. This pr now adds support to load the
native runtime when the filename starts with the name of the chain. So,
when usng `build-spec --chain rococo-something-else.jon` it will use the
rococo native runtime to load the chain spec.

* Apply suggestions from code review

Co-authored-by: Andronik Ordian <write@reusable.software>

Co-authored-by: Andronik Ordian <write@reusable.software>
This commit is contained in:
Bastian Köcher
2020-08-11 13:06:53 +02:00
committed by GitHub
parent 4bdfd02f93
commit a12f634e51
3 changed files with 29 additions and 10 deletions
+4
View File
@@ -59,6 +59,10 @@ pub struct RunCmd {
#[structopt(long = "force-westend")]
pub force_westend: bool,
/// Force using Rococo native runtime.
#[structopt(long)]
pub force_rococo: bool,
/// Enable the authority discovery module on validator or sentry nodes.
///
/// When enabled: