mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 01:07:57 +00:00
[big refactor] Remove crate aliasing. (#4395)
* Rename: Phase 1. * Unify codec. * Fixing: Phase 2 * Fixing: Phase 3. * Fixing: Phase 4. * Fixing: Phase 5. * Fixing: Phase 6. * Fixing: Phase 7. * Fixing: Phase 8. Tests * Fixing: Phase 9. Tests!!! * Fixing: Phase 10. Moar tests! * Finally done! * More fixes. * Rename primitives:: to sp_core:: * Apply renames in finality-grandpa. * Fix benches. * Fix benches 2. * Revert node-template. * Fix frame-system in our modules.
This commit is contained in:
committed by
Gavin Wood
parent
f14d98a439
commit
8778ca7dc8
@@ -16,8 +16,8 @@
|
||||
|
||||
//! Substrate chain configurations.
|
||||
|
||||
use chain_spec::ChainSpecExtension;
|
||||
use primitives::{Pair, Public, crypto::UncheckedInto, sr25519};
|
||||
use sc_chain_spec::ChainSpecExtension;
|
||||
use sp_core::{Pair, Public, crypto::UncheckedInto, sr25519};
|
||||
use serde::{Serialize, Deserialize};
|
||||
use node_runtime::{
|
||||
AuthorityDiscoveryConfig, BabeConfig, BalancesConfig, ContractsConfig, CouncilConfig, DemocracyConfig,
|
||||
@@ -30,9 +30,9 @@ use sc_service;
|
||||
use hex_literal::hex;
|
||||
use sc_telemetry::TelemetryEndpoints;
|
||||
use grandpa_primitives::{AuthorityId as GrandpaId};
|
||||
use babe_primitives::{AuthorityId as BabeId};
|
||||
use im_online::sr25519::{AuthorityId as ImOnlineId};
|
||||
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
|
||||
use sp_consensus_babe::{AuthorityId as BabeId};
|
||||
use pallet_im_online::sr25519::{AuthorityId as ImOnlineId};
|
||||
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
|
||||
use sp_runtime::{Perbill, traits::{Verify, IdentifyAccount}};
|
||||
|
||||
pub use node_primitives::{AccountId, Balance, Signature};
|
||||
@@ -49,7 +49,7 @@ const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
|
||||
#[derive(Default, Clone, Serialize, Deserialize, ChainSpecExtension)]
|
||||
pub struct Extensions {
|
||||
/// Block numbers with known hashes.
|
||||
pub fork_blocks: client::ForkBlocks<Block>,
|
||||
pub fork_blocks: sc_client::ForkBlocks<Block>,
|
||||
}
|
||||
|
||||
/// Specialized `ChainSpec`.
|
||||
@@ -229,24 +229,24 @@ pub fn testnet_genesis(
|
||||
code: WASM_BINARY.to_vec(),
|
||||
changes_trie_config: Default::default(),
|
||||
}),
|
||||
balances: Some(BalancesConfig {
|
||||
pallet_balances: Some(BalancesConfig {
|
||||
balances: endowed_accounts.iter().cloned()
|
||||
.map(|k| (k, ENDOWMENT))
|
||||
.chain(initial_authorities.iter().map(|x| (x.0.clone(), STASH)))
|
||||
.collect(),
|
||||
vesting: vec![],
|
||||
}),
|
||||
indices: Some(IndicesConfig {
|
||||
pallet_indices: Some(IndicesConfig {
|
||||
ids: endowed_accounts.iter().cloned()
|
||||
.chain(initial_authorities.iter().map(|x| x.0.clone()))
|
||||
.collect::<Vec<_>>(),
|
||||
}),
|
||||
session: Some(SessionConfig {
|
||||
pallet_session: Some(SessionConfig {
|
||||
keys: initial_authorities.iter().map(|x| {
|
||||
(x.0.clone(), session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone()))
|
||||
}).collect::<Vec<_>>(),
|
||||
}),
|
||||
staking: Some(StakingConfig {
|
||||
pallet_staking: Some(StakingConfig {
|
||||
current_era: 0,
|
||||
validator_count: initial_authorities.len() as u32 * 2,
|
||||
minimum_validator_count: initial_authorities.len() as u32,
|
||||
@@ -257,41 +257,41 @@ pub fn testnet_genesis(
|
||||
slash_reward_fraction: Perbill::from_percent(10),
|
||||
.. Default::default()
|
||||
}),
|
||||
democracy: Some(DemocracyConfig::default()),
|
||||
collective_Instance1: Some(CouncilConfig {
|
||||
pallet_democracy: Some(DemocracyConfig::default()),
|
||||
pallet_collective_Instance1: Some(CouncilConfig {
|
||||
members: endowed_accounts.iter().cloned()
|
||||
.collect::<Vec<_>>()[..(num_endowed_accounts + 1) / 2].to_vec(),
|
||||
phantom: Default::default(),
|
||||
}),
|
||||
collective_Instance2: Some(TechnicalCommitteeConfig {
|
||||
pallet_collective_Instance2: Some(TechnicalCommitteeConfig {
|
||||
members: endowed_accounts.iter().cloned()
|
||||
.collect::<Vec<_>>()[..(num_endowed_accounts + 1) / 2].to_vec(),
|
||||
phantom: Default::default(),
|
||||
}),
|
||||
contracts: Some(ContractsConfig {
|
||||
current_schedule: contracts::Schedule {
|
||||
pallet_contracts: Some(ContractsConfig {
|
||||
current_schedule: pallet_contracts::Schedule {
|
||||
enable_println, // this should only be enabled on development chains
|
||||
..Default::default()
|
||||
},
|
||||
gas_price: 1 * MILLICENTS,
|
||||
}),
|
||||
sudo: Some(SudoConfig {
|
||||
pallet_sudo: Some(SudoConfig {
|
||||
key: root_key,
|
||||
}),
|
||||
babe: Some(BabeConfig {
|
||||
pallet_babe: Some(BabeConfig {
|
||||
authorities: vec![],
|
||||
}),
|
||||
im_online: Some(ImOnlineConfig {
|
||||
pallet_im_online: Some(ImOnlineConfig {
|
||||
keys: vec![],
|
||||
}),
|
||||
authority_discovery: Some(AuthorityDiscoveryConfig {
|
||||
pallet_authority_discovery: Some(AuthorityDiscoveryConfig {
|
||||
keys: vec![],
|
||||
}),
|
||||
grandpa: Some(GrandpaConfig {
|
||||
pallet_grandpa: Some(GrandpaConfig {
|
||||
authorities: vec![],
|
||||
}),
|
||||
membership_Instance1: Some(Default::default()),
|
||||
treasury: Some(Default::default()),
|
||||
pallet_membership_Instance1: Some(Default::default()),
|
||||
pallet_treasury: Some(Default::default()),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,7 +351,7 @@ pub(crate) mod tests {
|
||||
use super::*;
|
||||
use crate::service::new_full;
|
||||
use sc_service::Roles;
|
||||
use service_test;
|
||||
use sc_service_test;
|
||||
|
||||
fn local_testnet_genesis_instant_single() -> GenesisConfig {
|
||||
testnet_genesis(
|
||||
@@ -395,7 +395,7 @@ pub(crate) mod tests {
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn test_connectivity() {
|
||||
service_test::connectivity(
|
||||
sc_service_test::connectivity(
|
||||
integration_test_config_with_two_authorities(),
|
||||
|config| new_full(config),
|
||||
|mut config| {
|
||||
|
||||
Reference in New Issue
Block a user