mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 13:21:10 +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,17 +19,17 @@
|
||||
use super::*;
|
||||
|
||||
use std::cell::RefCell;
|
||||
use support::{impl_outer_origin, parameter_types, weights::Weight};
|
||||
use primitives::H256;
|
||||
use frame_support::{impl_outer_origin, parameter_types, weights::Weight};
|
||||
use sp_core::H256;
|
||||
// The testing primitives are very useful for avoiding having to work with signatures
|
||||
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are requried.
|
||||
use sp_runtime::{
|
||||
Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header,
|
||||
};
|
||||
use system::EnsureSignedBy;
|
||||
use frame_system::EnsureSignedBy;
|
||||
|
||||
impl_outer_origin! {
|
||||
pub enum Origin for Test {}
|
||||
pub enum Origin for Test where system = frame_system {}
|
||||
}
|
||||
|
||||
// For testing the module, we construct most of a mock runtime. This means
|
||||
@@ -54,7 +54,7 @@ parameter_types! {
|
||||
pub const CreationFee: u64 = 0;
|
||||
}
|
||||
|
||||
impl system::Trait for Test {
|
||||
impl frame_system::Trait for Test {
|
||||
type Origin = Origin;
|
||||
type Index = u64;
|
||||
type BlockNumber = u64;
|
||||
@@ -72,7 +72,7 @@ impl system::Trait for Test {
|
||||
type Version = ();
|
||||
}
|
||||
|
||||
impl balances::Trait for Test {
|
||||
impl pallet_balances::Trait for Test {
|
||||
type Balance = u64;
|
||||
type OnFreeBalanceZero = ();
|
||||
type OnNewAccount = ();
|
||||
@@ -116,7 +116,7 @@ impl Trait for Test {
|
||||
type KickOrigin = EnsureSignedBy<KickOrigin, u64>;
|
||||
type MembershipInitialized = TestChangeMembers;
|
||||
type MembershipChanged = TestChangeMembers;
|
||||
type Currency = balances::Module<Self>;
|
||||
type Currency = pallet_balances::Module<Self>;
|
||||
type CandidateDeposit = CandidateDeposit;
|
||||
type Period = Period;
|
||||
type Score = u64;
|
||||
@@ -126,9 +126,9 @@ impl Trait for Test {
|
||||
// This function basically just builds a genesis storage key/value store according to
|
||||
// our desired mockup.
|
||||
pub fn new_test_ext() -> sp_io::TestExternalities {
|
||||
let mut t = system::GenesisConfig::default().build_storage::<Test>().unwrap();
|
||||
let mut t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap();
|
||||
// We use default for brevity, but you can configure as desired if needed.
|
||||
balances::GenesisConfig::<Test> {
|
||||
pallet_balances::GenesisConfig::<Test> {
|
||||
balances: vec![
|
||||
(5, 500_000),
|
||||
(10, 500_000),
|
||||
|
||||
Reference in New Issue
Block a user