From 05b92f730d98838b289ead3c8dd6bd8ccaa6a498 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Mon, 15 May 2023 12:31:55 +0200 Subject: [PATCH] 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 --- frame/staking/src/pallet/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frame/staking/src/pallet/mod.rs b/frame/staking/src/pallet/mod.rs index a725d43515b4c..c5c9c669d2b48 100644 --- a/frame/staking/src/pallet/mod.rs +++ b/frame/staking/src/pallet/mod.rs @@ -631,7 +631,7 @@ pub mod pallet { MaxNominatorsCount::::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 => >::validate( - T::RuntimeOrigin::from(Some(controller.clone()).into()), + T::RuntimeOrigin::from(Some(stash.clone()).into()), Default::default(), ), crate::StakerStatus::Nominator(votes) => >::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(()),