pallet_members::pallet::dispatchables

Function unregister_member

Source
pub fn unregister_member<T: Config>(member: AccountId)
Expand description
  • unregister_member: Unregisters a member from the network.

§Flow

  1. Receives origin (caller’s account).
  2. Ensures the origin is signed (authenticated) and retrieves the member account.
  3. Retrieves the current network of the member ([MemberNetwork::<T>::take(&member)]).
  4. Calls Self::unregister_member_from_network to perform the actual unregistration tasks:
  5. Removes data from storage (MemberPeerId::<T>, Heartbeat::<T>, MemberOnline::<T>).
  6. Emits Event::UnRegisteredMember.
  7. Calls Self::member_offline to mark the member as offline and calculate weight adjustments.
  8. Returns Ok(()) if successful.

§Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::unregister_member.