mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 04:51:01 +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
@@ -19,12 +19,12 @@
|
||||
#![cfg(test)]
|
||||
|
||||
use std::cell::RefCell;
|
||||
use support::{
|
||||
use frame_support::{
|
||||
StorageValue, StorageMap, parameter_types, assert_ok,
|
||||
traits::{Get, ChangeMembers, Currency},
|
||||
weights::Weight,
|
||||
};
|
||||
use primitives::H256;
|
||||
use sp_core::H256;
|
||||
use sp_runtime::{
|
||||
Perbill, BuildStorage, testing::Header, traits::{BlakeTwo256, IdentityLookup, Block as BlockT},
|
||||
};
|
||||
@@ -37,7 +37,7 @@ parameter_types! {
|
||||
pub const MaximumBlockLength: u32 = 2 * 1024;
|
||||
pub const AvailableBlockRatio: Perbill = Perbill::one();
|
||||
}
|
||||
impl system::Trait for Test {
|
||||
impl frame_system::Trait for Test {
|
||||
type Origin = Origin;
|
||||
type Index = u64;
|
||||
type BlockNumber = u64;
|
||||
@@ -60,7 +60,7 @@ parameter_types! {
|
||||
pub const TransferFee: u64 = 0;
|
||||
pub const CreationFee: u64 = 0;
|
||||
}
|
||||
impl balances::Trait for Test {
|
||||
impl pallet_balances::Trait for Test {
|
||||
type Balance = u64;
|
||||
type OnNewAccount = ();
|
||||
type OnFreeBalanceZero = ();
|
||||
@@ -145,14 +145,15 @@ impl elections::Trait for Test {
|
||||
pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>;
|
||||
pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic<u32, u64, Call, ()>;
|
||||
|
||||
support::construct_runtime!(
|
||||
use frame_system as system;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test where
|
||||
Block = Block,
|
||||
NodeBlock = Block,
|
||||
UncheckedExtrinsic = UncheckedExtrinsic
|
||||
{
|
||||
System: system::{Module, Call, Event},
|
||||
Balances: balances::{Module, Call, Event<T>, Config<T>, Error},
|
||||
Balances: pallet_balances::{Module, Call, Event<T>, Config<T>, Error},
|
||||
Elections: elections::{Module, Call, Event<T>, Config<T>},
|
||||
}
|
||||
);
|
||||
@@ -210,7 +211,7 @@ impl ExtBuilder {
|
||||
PRESENT_SLASH_PER_VOTER.with(|v| *v.borrow_mut() = self.bad_presentation_punishment);
|
||||
DECAY_RATIO.with(|v| *v.borrow_mut() = self.decay_ratio);
|
||||
GenesisConfig {
|
||||
balances: Some(balances::GenesisConfig::<Test>{
|
||||
pallet_balances: Some(pallet_balances::GenesisConfig::<Test>{
|
||||
balances: vec![
|
||||
(1, 10 * self.balance_factor),
|
||||
(2, 20 * self.balance_factor),
|
||||
|
||||
Reference in New Issue
Block a user