mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 19:51:05 +00:00
Rename pallet trait Trait to Config (#7599)
* rename Trait to Config * add test asserting using Trait is still valid. * fix ui tests
This commit is contained in:
committed by
GitHub
parent
dd3c84c362
commit
1cbfc9257f
@@ -71,7 +71,7 @@ pub struct Call;
|
||||
|
||||
impl Dispatchable for Call {
|
||||
type Origin = Origin;
|
||||
type Trait = ();
|
||||
type Config = ();
|
||||
type Info = DispatchInfo;
|
||||
type PostInfo = PostDispatchInfo;
|
||||
fn dispatch(self, _origin: Self::Origin)
|
||||
@@ -80,7 +80,7 @@ impl Dispatchable for Call {
|
||||
}
|
||||
}
|
||||
|
||||
impl Trait for Test {
|
||||
impl Config for Test {
|
||||
type BaseCallFilter = ();
|
||||
type Origin = Origin;
|
||||
type Call = Call;
|
||||
@@ -109,16 +109,16 @@ impl Trait for Test {
|
||||
}
|
||||
|
||||
pub type System = Module<Test>;
|
||||
pub type SysEvent = <Test as Trait>::Event;
|
||||
pub type SysEvent = <Test as Config>::Event;
|
||||
|
||||
pub const CALL: &<Test as Trait>::Call = &Call;
|
||||
pub const CALL: &<Test as Config>::Call = &Call;
|
||||
|
||||
/// Create new externalities for `System` module tests.
|
||||
pub fn new_test_ext() -> sp_io::TestExternalities {
|
||||
let mut ext: sp_io::TestExternalities = GenesisConfig::default().build_storage::<Test>().unwrap().into();
|
||||
// Add to each test the initial weight of a block
|
||||
ext.execute_with(|| System::register_extra_weight_unchecked(
|
||||
<Test as Trait>::BlockExecutionWeight::get(),
|
||||
<Test as Config>::BlockExecutionWeight::get(),
|
||||
DispatchClass::Mandatory
|
||||
));
|
||||
ext
|
||||
|
||||
Reference in New Issue
Block a user