mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 14:11:02 +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
@@ -31,7 +31,7 @@ const MAX_SLASHES: u32 = 1000;
|
||||
|
||||
// Add slashing spans to a user account. Not relevant for actual use, only to benchmark
|
||||
// read and write operations.
|
||||
fn add_slashing_spans<T: Trait>(who: &T::AccountId, spans: u32) {
|
||||
fn add_slashing_spans<T: Config>(who: &T::AccountId, spans: u32) {
|
||||
if spans == 0 { return }
|
||||
|
||||
// For the first slashing span, we initialize
|
||||
@@ -48,7 +48,7 @@ fn add_slashing_spans<T: Trait>(who: &T::AccountId, spans: u32) {
|
||||
// This function clears all existing validators and nominators from the set, and generates one new
|
||||
// validator being nominated by n nominators, and returns the validator stash account and the
|
||||
// nominators' stash and controller. It also starts an era and creates pending payouts.
|
||||
pub fn create_validator_with_nominators<T: Trait>(
|
||||
pub fn create_validator_with_nominators<T: Config>(
|
||||
n: u32,
|
||||
upper_bound: u32,
|
||||
dead: bool,
|
||||
@@ -729,7 +729,7 @@ mod tests {
|
||||
|
||||
let (validator_stash, nominators) = create_validator_with_nominators::<Test>(
|
||||
n,
|
||||
<Test as Trait>::MaxNominatorRewardedPerValidator::get() as u32,
|
||||
<Test as Config>::MaxNominatorRewardedPerValidator::get() as u32,
|
||||
false,
|
||||
RewardDestination::Staked,
|
||||
).unwrap();
|
||||
@@ -753,7 +753,7 @@ mod tests {
|
||||
|
||||
let (validator_stash, _nominators) = create_validator_with_nominators::<Test>(
|
||||
n,
|
||||
<Test as Trait>::MaxNominatorRewardedPerValidator::get() as u32,
|
||||
<Test as Config>::MaxNominatorRewardedPerValidator::get() as u32,
|
||||
false,
|
||||
RewardDestination::Staked,
|
||||
).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user