Skip to content

Commit

Permalink
bump instruction discriminators
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec committed Oct 16, 2023
1 parent dce6db2 commit dfa3dd8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions token-group/interface/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use {
/// Instruction data for initializing a new `Group`
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable, SplDiscriminate)]
#[discriminator_hash_input("spl_token_group_interface:initialize_group")]
#[discriminator_hash_input("spl_token_group_interface:initialize_token_group")]
pub struct InitializeGroup {
/// Update authority for the group
pub update_authority: OptionalNonZeroPubkey,
Expand All @@ -38,7 +38,7 @@ pub struct UpdateGroupMaxSize {
/// Instruction data for updating the authority of a `Group`
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable, SplDiscriminate)]
#[discriminator_hash_input("spl_token_group_interface:update_group_authority")]
#[discriminator_hash_input("spl_token_group_interface:update_authority")]
pub struct UpdateGroupAuthority {
/// New authority for the group, or unset if `None`
pub new_authority: OptionalNonZeroPubkey,
Expand Down Expand Up @@ -278,7 +278,7 @@ mod test {
max_size: 100.into(),
};
let instruction = TokenGroupInterfaceInstruction::InitializeGroup(data);
let preimage = hash::hashv(&[format!("{NAMESPACE}:initialize_group").as_bytes()]);
let preimage = hash::hashv(&[format!("{NAMESPACE}:initialize_token_group").as_bytes()]);
let discriminator = &preimage.as_ref()[..ArrayDiscriminator::LENGTH];
instruction_pack_unpack::<InitializeGroup>(instruction, discriminator, data);
}
Expand All @@ -300,7 +300,7 @@ mod test {
new_authority: OptionalNonZeroPubkey::default(),
};
let instruction = TokenGroupInterfaceInstruction::UpdateGroupAuthority(data);
let preimage = hash::hashv(&[format!("{NAMESPACE}:update_group_authority").as_bytes()]);
let preimage = hash::hashv(&[format!("{NAMESPACE}:update_authority").as_bytes()]);
let discriminator = &preimage.as_ref()[..ArrayDiscriminator::LENGTH];
instruction_pack_unpack::<UpdateGroupAuthority>(instruction, discriminator, data);
}
Expand Down

0 comments on commit dfa3dd8

Please sign in to comment.