Staking: chill_other takes stash instead of controller (#2501)

The `chill_other` call is the only staking call that explicitly requires
`controller` in its signature. This PR changes the controller arg to be
the stash instead, with `StakingLedger` then fetching the controller
from storage.

This is not a breaking change per se - the call types do not change, but
is noteworthy as UIs will now want to pass the stash account into
`chill_other` calls, & metadata will reflect this.

Note: This is very low impact. `chill_other` has [hardly ever been
used](https://polkadot.subscan.io/extrinsic?address=&module=staking&call=chill_other&result=all&signedChecked=signed%20only&startDate=&endDate=&startBlock=&timeType=date&version=9431&endBlock=)
on Polkadot - notwithstanding the one called 11 days ago at block
18177457 that was a part of test I did, the last call was made 493 days
ago. Only 2 calls have ever been successful.

Addresses controller deprecation #2500

---------

Co-authored-by: command-bot <>
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
This commit is contained in:
Ross Bulat
2023-11-27 21:42:04 +07:00
committed by GitHub
parent fd1ed403c9
commit 838a534da8
3 changed files with 203 additions and 194 deletions
+1 -1
View File
@@ -873,7 +873,7 @@ benchmarks! {
)?;
let caller = whitelisted_caller();
}: _(RawOrigin::Signed(caller), controller)
}: _(RawOrigin::Signed(caller), stash.clone())
verify {
assert!(!T::VoterList::contains(&stash));
}