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
@@ -206,7 +206,7 @@ fn authority_index() {
#[test]
fn can_predict_next_epoch_change() {
new_test_ext(1).execute_with(|| {
assert_eq!(<Test as Trait>::EpochDuration::get(), 3);
assert_eq!(<Test as Config>::EpochDuration::get(), 3);
// this sets the genesis slot to 6;
go_to_block(1, 6);
assert_eq!(Babe::genesis_slot(), 6);
@@ -227,7 +227,7 @@ fn can_predict_next_epoch_change() {
#[test]
fn can_enact_next_config() {
new_test_ext(1).execute_with(|| {
assert_eq!(<Test as Trait>::EpochDuration::get(), 3);
assert_eq!(<Test as Config>::EpochDuration::get(), 3);
// this sets the genesis slot to 6;
go_to_block(1, 6);
assert_eq!(Babe::genesis_slot(), 6);
@@ -661,7 +661,7 @@ fn report_equivocation_has_valid_weight() {
// but there's a lower bound of 100 validators.
assert!(
(1..=100)
.map(<Test as Trait>::WeightInfo::report_equivocation)
.map(<Test as Config>::WeightInfo::report_equivocation)
.collect::<Vec<_>>()
.windows(2)
.all(|w| w[0] == w[1])
@@ -671,7 +671,7 @@ fn report_equivocation_has_valid_weight() {
// with every extra validator.
assert!(
(100..=1000)
.map(<Test as Trait>::WeightInfo::report_equivocation)
.map(<Test as Config>::WeightInfo::report_equivocation)
.collect::<Vec<_>>()
.windows(2)
.all(|w| w[0] < w[1])