From 2ce7dd414f3f581f8441b8d40a7d488715be0348 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 19 Oct 2023 13:56:19 +0200 Subject: [PATCH] add multi-group comment --- token-group/example/src/processor.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/token-group/example/src/processor.rs b/token-group/example/src/processor.rs index b0f9e8e0959..e9604e1a44f 100644 --- a/token-group/example/src/processor.rs +++ b/token-group/example/src/processor.rs @@ -189,6 +189,8 @@ pub fn process_initialize_member(_program_id: &Pubkey, accounts: &[AccountInfo]) // Allocate a TLV entry for the space and write it in let mut buffer = member_info.try_borrow_mut_data()?; let mut state = TlvStateMut::unpack(&mut buffer)?; + // Note if `allow_repetition: true` is instead used here, one can initialize + // the same token as a member of multiple groups! let (member, _) = state.init_value::(false)?; *member = TokenGroupMember::new(member_mint_info.key, group_info.key, member_number);