mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 00:51:06 +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
@@ -25,9 +25,9 @@ use frame_benchmarking::{benchmarks, account, whitelisted_caller};
|
||||
|
||||
const SEED: u32 = 0;
|
||||
|
||||
fn assert_last_event<T: Trait>(generic_event: <T as Trait>::Event) {
|
||||
fn assert_last_event<T: Config>(generic_event: <T as Config>::Event) {
|
||||
let events = frame_system::Module::<T>::events();
|
||||
let system_event: <T as frame_system::Trait>::Event = generic_event.into();
|
||||
let system_event: <T as frame_system::Config>::Event = generic_event.into();
|
||||
// compare to the last event record
|
||||
let EventRecord { event, .. } = &events[events.len() - 1];
|
||||
assert_eq!(event, &system_event);
|
||||
@@ -38,7 +38,7 @@ benchmarks! {
|
||||
|
||||
batch {
|
||||
let c in 0 .. 1000;
|
||||
let mut calls: Vec<<T as Trait>::Call> = Vec::new();
|
||||
let mut calls: Vec<<T as Config>::Call> = Vec::new();
|
||||
for i in 0 .. c {
|
||||
let call = frame_system::Call::remark(vec![]).into();
|
||||
calls.push(call);
|
||||
@@ -59,7 +59,7 @@ benchmarks! {
|
||||
|
||||
batch_all {
|
||||
let c in 0 .. 1000;
|
||||
let mut calls: Vec<<T as Trait>::Call> = Vec::new();
|
||||
let mut calls: Vec<<T as Config>::Call> = Vec::new();
|
||||
for i in 0 .. c {
|
||||
let call = frame_system::Call::remark(vec![]).into();
|
||||
calls.push(call);
|
||||
|
||||
Reference in New Issue
Block a user