diff --git a/substrate/frame/staking/src/pallet/mod.rs b/substrate/frame/staking/src/pallet/mod.rs index a725d43515..c5c9c669d2 100644 --- a/substrate/frame/staking/src/pallet/mod.rs +++ b/substrate/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(()),