fn handle_reclaim(pid: u64, orig_stake: BalanceOf<T>, slashed: BalanceOf<T>) {
			let mut pool_info = Self::ensure_pool(pid).expect("Stake pool must exist; qed.");

			let returned = orig_stake - slashed;
			if slashed != Zero::zero() {
				// Remove some slashed value from `total_stake`, causing the share price to reduce
				// and creating a logical pending slash. The actual slash happens with the pending
				// slash to individuals is settled.
				pool_info.slash(slashed);
				Self::deposit_event(Event::<T>::PoolSlashed(pid, slashed));
			}

			// With the worker being cleaned, those stake now are free
			debug_assert!(
				pool_info.releasing_stake >= returned,
				"More return then expected"
			);
			pool_info.free_stake.saturating_accrue(returned);
			pool_info.releasing_stake.saturating_reduce(returned);

			Self::try_process_withdraw_queue(&mut pool_info);
			StakePools::<T>::insert(&pid, &pool_info);
		}
/// Called when worker was reclaimed.
///
/// After the cool down ends, worker was cleaned up, whose contributed balance would be
/// reset to zero.
Called when worker was reclaimed.
After the cool down ends, worker was cleaned up, whose contributed balance would be
reset to zero.
Called when worker was reclaimed . After the cool down ends worker was cleaned up whose contributed balance would be reset to zero .
fn handle_reclaim(pid: u64, orig_stake: BalanceOf<T>, slashed: BalanceOf<T>) {
			let mut pool_info = Self::ensure_pool(pid).expect("Stake pool must exist; qed.");
			let returned = orig_stake - slashed;
			if slashed != Zero::zero() {
				// Remove some slashed value from `total_stake`, causing the share price to reduce
				// and creating a logical pending slash. The actual slash happens with the pending
				// slash to individuals is settled.
				pool_info.slash(slashed);
				Self::deposit_event(Event::<T>::PoolSlashed(pid, slashed));
			}
			// With the worker being cleaned, those stake now are free
			debug_assert!(
				pool_info.releasing_stake >= returned,
				"More return then expected"
			);
			pool_info.free_stake.saturating_accrue(returned);
			pool_info.releasing_stake.saturating_reduce(returned);
			Self::try_process_withdraw_queue(&mut pool_info);
			StakePools::<T>::insert(&pid, &pool_info);
		}
fn handle_reclaim ( pid : u64 , orig_stake : BalanceOf < T > , slashed : BalanceOf < T > ) { let mut pool_info = Self :: ensure_pool ( pid ) . expect ( " " ) ; let returned = orig_stake - slashed ; if slashed != Zero :: zero ( ) { // Remove some slashed value from `total_stake`, causing the share price to reduce // and creating a logical pending slash. The actual slash happens with the pending // slash to individuals is settled. pool_info . slash ( slashed ) ; Self :: deposit_event ( Event :: < T > :: PoolSlashed ( pid , slashed ) ) ; } // With the worker being cleaned, those stake now are free debug_assert ! ( pool_info releasing_stake returned " " ) ; pool_info . free_stake . saturating_accrue ( returned ) ; pool_info . releasing_stake . saturating_reduce ( returned ) ; Self :: try_process_withdraw_queue ( & mut pool_info ) ; StakePools :: < T > :: insert ( & pid , & pool_info ) ; }
Called when worker was reclaimed.
Called when worker was reclaimed .
pid
u64
orig_stake
BalanceOf<T>
slashed
BalanceOf<T>
pid
u64
orig_stake
BalanceOf<T>
slashed
BalanceOf<T>