pub fn unbind_miner(miner: &T::AccountId, notify: bool) -> DispatchResult {
			let worker = Self::ensure_miner_bound(miner)?;
			let miner_info = Miners::<T>::get(miner)
				.expect("A bounded miner must has the associated MinerInfo; qed.");

			let force = !miner_info.state.can_unbind();
			if force {
				// Force unbinding. Stop the miner first.
				// Note that `stop_mining` will notify the suscribers with the slashed vaue.
				Self::stop_mining(miner.clone())?;
				// TODO: consider the final state sync (could cause slash) when stopping mining
			}
			MinerBindings::<T>::remove(miner);
			WorkerBindings::<T>::remove(&worker);
			Self::deposit_event(Event::<T>::MinerUnbound(miner.clone(), worker));
			if notify {
				T::OnUnbound::on_unbound(&worker, force);
			}

			Ok(())
		}
/// Unbinds a miner from a worker
///
/// - `notify`: whether to notify the subscribe the unbinding event.
///
/// Requires:
/// 1. The miner is bounded with a worker
Unbinds a miner from a worker
`notify`: whether to notify the subscribe the unbinding event.

1. The miner is bounded with a worker
Unbinds a miner from a worker ` notify ` : whether to notify the subscribe the unbinding event . 1 . The miner is bounded with a worker
pub fn unbind_miner(miner: &T::AccountId, notify: bool) -> DispatchResult {
			let worker = Self::ensure_miner_bound(miner)?;
			let miner_info = Miners::<T>::get(miner)
				.expect("A bounded miner must has the associated MinerInfo; qed.");
			let force = !miner_info.state.can_unbind();
			if force {
				// Force unbinding. Stop the miner first.
				// Note that `stop_mining` will notify the suscribers with the slashed vaue.
				Self::stop_mining(miner.clone())?;
				// TODO: consider the final state sync (could cause slash) when stopping mining
			}
			MinerBindings::<T>::remove(miner);
			WorkerBindings::<T>::remove(&worker);
			Self::deposit_event(Event::<T>::MinerUnbound(miner.clone(), worker));
			if notify {
				T::OnUnbound::on_unbound(&worker, force);
			}
			Ok(())
		}
pub fn unbind_miner ( miner : & T :: AccountId , notify : bool ) -> DispatchResult { let worker = Self :: ensure_miner_bound ( miner ) ? ; let miner_info = Miners :: < T > :: get ( miner ) . expect ( " " ) ; let force = ! miner_info . state . can_unbind ( ) ; if force { // Force unbinding. Stop the miner first. // Note that `stop_mining` will notify the suscribers with the slashed vaue. Self :: stop_mining ( miner . clone ( ) ) ? ; // TODO: consider the final state sync (could cause slash) when stopping mining } MinerBindings :: < T > :: remove ( miner ) ; WorkerBindings :: < T > :: remove ( & worker ) ; Self :: deposit_event ( Event :: < T > :: MinerUnbound ( miner . clone ( ) , worker ) ) ; if notify { T :: OnUnbound :: on_unbound ( & worker , force ) ; } Ok ( ( ) ) }
Unbinds a miner from a worker
 `notify`: whether to notify the subscribe the unbinding event.
Unbinds a miner from a worker ` notify ` : whether to notify the subscribe the unbinding event .
miner
&T::AccountId
notify
bool
miner
&T::AccountId
notify
bool