fn kill_stash(stash: &T::AccountId) -> DispatchResult {
        let controller = <Bonded<T>>::get(stash).ok_or(Error::<T>::NotStash)?;

        <Bonded<T>>::remove(stash);
        <Ledger<T>>::remove(&controller);

        <Payee<T>>::remove(stash);
        <Validators<T>>::remove(stash);
        <Guarantors<T>>::remove(stash);
        <StakeLimit<T>>::remove(stash);

        // TODO: this may update with `num_slashing_spans`?
        slashing::clear_stash_metadata::<T>(stash);

        Ok(())
    }
/// Remove all associated data of a stash account from the staking system.
///
/// Assumes storage is upgraded before calling.
///
/// This is called :
/// - Immediately when an account's balance falls below existential deposit.
/// - after a `withdraw_unbond()` call that frees all of a stash's bonded balance.
Remove all associated data of a stash account from the staking system.
Assumes storage is upgraded before calling.

This is called :
Immediately when an account's balance falls below existential deposit.
after a `withdraw_unbond()` call that frees all of a stash's bonded balance.
Remove all associated data of a stash account from the staking system . Assumes storage is upgraded before calling . This is called : Immediately when an account ' s balance falls below existential deposit . after a ` withdraw_unbond () ` call that frees all of a stash ' s bonded balance .
fn kill_stash(stash: &T::AccountId) -> DispatchResult {
        let controller = <Bonded<T>>::get(stash).ok_or(Error::<T>::NotStash)?;
        <Bonded<T>>::remove(stash);
        <Ledger<T>>::remove(&controller);
        <Payee<T>>::remove(stash);
        <Validators<T>>::remove(stash);
        <Guarantors<T>>::remove(stash);
        <StakeLimit<T>>::remove(stash);
        // TODO: this may update with `num_slashing_spans`?
        slashing::clear_stash_metadata::<T>(stash);
        Ok(())
    }
fn kill_stash ( stash : & T :: AccountId ) -> DispatchResult { let controller = < Bonded < T > > :: get ( stash ) . ok_or ( Error :: < T > :: NotStash ) ? ; < Bonded < T > > :: remove ( stash ) ; < Ledger < T > > :: remove ( & controller ) ; < Payee < T > > :: remove ( stash ) ; < Validators < T > > :: remove ( stash ) ; < Guarantors < T > > :: remove ( stash ) ; < StakeLimit < T > > :: remove ( stash ) ; // TODO: this may update with `num_slashing_spans`? slashing :: clear_stash_metadata :: < T > ( stash ) ; Ok ( ( ) ) }
Remove all associated data of a stash account from the staking system.
Remove all associated data of a stash account from the staking system .
stash
&T::AccountId