diff --git a/substrate/frame/staking/src/migrations.rs b/substrate/frame/staking/src/migrations.rs index c52501cbcef4..30941eefca1d 100644 --- a/substrate/frame/staking/src/migrations.rs +++ b/substrate/frame/staking/src/migrations.rs @@ -74,7 +74,7 @@ pub mod v17 { let old_disabled_validators = v16::DisabledValidators::::get(); // BoundedVec with MaxWinners limit, this should always work - let disabled_validators_maybe = WeakBoundedVec::try_from(old_disabled_validators); + let disabled_validators_maybe = BoundedVec::try_from(old_disabled_validators); match disabled_validators_maybe { Ok(disabled_validators) => DisabledValidators::::set(disabled_validators), Err(_) => { diff --git a/substrate/frame/staking/src/mock.rs b/substrate/frame/staking/src/mock.rs index 08ba7efd3918..aa4cf003be22 100644 --- a/substrate/frame/staking/src/mock.rs +++ b/substrate/frame/staking/src/mock.rs @@ -325,7 +325,7 @@ pub struct ExtBuilder { nominate: bool, validator_count: u32, minimum_validator_count: u32, - invulnerables: Vec, + invulnerables: BoundedVec::MaxInvulnerables>, has_stakers: bool, initialize_first_session: bool, pub min_nominator_bond: Balance, @@ -377,7 +377,7 @@ impl ExtBuilder { self } pub fn invulnerables(mut self, invulnerables: Vec) -> Self { - self.invulnerables = BoundedVec::force_from(invulnerables).unwrap(); + self.invulnerables = BoundedVec::try_from(invulnerables).unwrap(); self } pub fn session_per_era(self, length: SessionIndex) -> Self {