mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
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:
@@ -3,10 +3,10 @@ use node_template_runtime::{
|
||||
AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig,
|
||||
SudoConfig, SystemConfig, WASM_BINARY, Signature
|
||||
};
|
||||
use sp_consensus_aura::sr25519::{AuthorityId as AuraId};
|
||||
use sp_finality_grandpa::{AuthorityId as GrandpaId};
|
||||
use sc_service;
|
||||
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
|
||||
use sp_finality_grandpa::AuthorityId as GrandpaId;
|
||||
use sp_runtime::traits::{Verify, IdentifyAccount};
|
||||
use sc_service::ChainType;
|
||||
|
||||
// Note this is the URL for the telemetry server
|
||||
//const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
|
||||
@@ -42,6 +42,7 @@ pub fn development_config() -> ChainSpec {
|
||||
ChainSpec::from_genesis(
|
||||
"Development",
|
||||
"dev",
|
||||
ChainType::Development,
|
||||
|| testnet_genesis(
|
||||
vec![
|
||||
authority_keys_from_seed("Alice"),
|
||||
@@ -67,6 +68,7 @@ pub fn local_testnet_config() -> ChainSpec {
|
||||
ChainSpec::from_genesis(
|
||||
"Local Testnet",
|
||||
"local_testnet",
|
||||
ChainType::Local,
|
||||
|| testnet_genesis(
|
||||
vec![
|
||||
authority_keys_from_seed("Alice"),
|
||||
|
||||
Reference in New Issue
Block a user