pub fn register_member<T: Config>(
network: NetworkId,
member: AccountId,
peer_id: PeerId,
)Expand description
register_member: Registers a member with specified network ID, public key, peer ID, and bond (staking amount).
§Flow
- Receives
origin(caller’s account),network(NetworkId),peer_id(PeerId). - Ensures the
originis AdminOrigin (authenticated). - Validates the
public_keyagainst theoriginaccount. - Checks if the member is already registered and unregisters them if necessary.
- Inserts member data into respective storage maps (
MemberNetwork::<T>,MemberPeerId::<T>,Heartbeat::<T>). - Marks the member as online (
MemberOnline::<T>). - Emits
Event::RegisteredMember. - Calls
Self::member_onlineto notify the network election system. - 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::register_member.