Add new RPC method to get the chain type (#5576)

* Add new RPC method to get the chain type

This adds a new RPC method to get the chain type of the running chain.
The chain type needs to be specified in the chain spec. This should make
it easier for tools/UI to display extra information without needing to
rely on parsing the chain name.

* Update client/rpc-api/src/system/mod.rs

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Primitive crate

* Feedback

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
This commit is contained in:
Bastian Köcher
2020-04-08 20:41:51 +02:00
committed by GitHub
parent 1d2cbfbdf9
commit 7cdfaff12b
19 changed files with 135 additions and 26 deletions
@@ -120,6 +120,7 @@ fn generate_chain_spec(
let chain_spec = chain_spec::ChainSpec::from_genesis(
"Custom",
"custom",
sc_chain_spec::ChainType::Live,
move || genesis_constructor(&authority_seeds, &endowed_accounts, &sudo_account),
vec![],
None,