From 5333a7dec67931fa045de4b1f3d8ac6b4c8dd737 Mon Sep 17 00:00:00 2001 From: giuseppere Date: Tue, 3 Dec 2024 19:09:03 +0100 Subject: [PATCH] fix --- substrate/frame/root-offences/src/mock.rs | 4 ++-- substrate/frame/staking/src/tests.rs | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/substrate/frame/root-offences/src/mock.rs b/substrate/frame/root-offences/src/mock.rs index f300fe6f45fb..b5fdd56daf6d 100644 --- a/substrate/frame/root-offences/src/mock.rs +++ b/substrate/frame/root-offences/src/mock.rs @@ -181,7 +181,7 @@ impl Config for Test { pub struct ExtBuilder { validator_count: u32, minimum_validator_count: u32, - invulnerables: Vec, + invulnerables: BoundedVec::MaxInvulnerables>, balance_factor: Balance, } @@ -237,7 +237,7 @@ impl ExtBuilder { stakers: stakers.clone(), validator_count: self.validator_count, minimum_validator_count: self.minimum_validator_count, - invulnerables: BoundedVec::force_from(self.invulnerables), + invulnerables: self.invulnerables, slash_reward_fraction: Perbill::from_percent(10), ..Default::default() } diff --git a/substrate/frame/staking/src/tests.rs b/substrate/frame/staking/src/tests.rs index 113bbf6d6461..406ba23b1af5 100644 --- a/substrate/frame/staking/src/tests.rs +++ b/substrate/frame/staking/src/tests.rs @@ -8710,11 +8710,7 @@ mod getters { let era: EraIndex = 12; let mut reward_map = BoundedBTreeMap::new(); frame_support::assert_ok!(reward_map.try_insert(11, 1)); - let reward_points = - EraRewardPoints::::MaxValidatorsCount> { - total: 1, - individual: reward_map, - }; + let reward_points = EraRewardPoints::<_, _> { total: 1, individual: reward_map }; ErasRewardPoints::::insert(era, reward_points); // when