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:
Guillaume Thiolliere
2020-11-30 15:34:54 +01:00
committed by GitHub
parent dd3c84c362
commit 1cbfc9257f
200 changed files with 1767 additions and 1607 deletions
+4 -4
View File
@@ -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);