Fix staking genesis build (#14140)

Cumulus CI is stuck in https://github.com/paritytech/cumulus/pull/2574, so companion check will be red.
Changes_
- Controller not needed

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2023-05-15 12:31:55 +02:00
committed by GitHub
parent 8136ab981e
commit c830bba300
+3 -3
View File
@@ -631,7 +631,7 @@ pub mod pallet {
MaxNominatorsCount::<T>::put(x);
}
for &(ref stash, ref controller, balance, ref status) in &self.stakers {
for &(ref stash, _, balance, ref status) in &self.stakers {
crate::log!(
trace,
"inserting genesis staker: {:?} => {:?} => {:?}",
@@ -650,11 +650,11 @@ pub mod pallet {
));
frame_support::assert_ok!(match status {
crate::StakerStatus::Validator => <Pallet<T>>::validate(
T::RuntimeOrigin::from(Some(controller.clone()).into()),
T::RuntimeOrigin::from(Some(stash.clone()).into()),
Default::default(),
),
crate::StakerStatus::Nominator(votes) => <Pallet<T>>::nominate(
T::RuntimeOrigin::from(Some(controller.clone()).into()),
T::RuntimeOrigin::from(Some(stash.clone()).into()),
votes.iter().map(|l| T::Lookup::unlookup(l.clone())).collect(),
),
_ => Ok(()),