Skip to content

Commit

Permalink
fix for sha2+curve25519 feature activation
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Aug 5, 2024
1 parent 17d5889 commit cc6e753
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions sdk/program-core/src/address_lookup_table/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub fn derive_lookup_table_address(
)
}

#[cfg(all(feature = "bincode", any(feature = "curve25519", target_os = "solana")))]
#[cfg(all(feature = "bincode", any(all(feature = "curve25519", feature = "sha2"), target_os = "solana")))]
/// Constructs an instruction to create a table account and returns
/// the instruction and the table account's derived address.
fn create_lookup_table_common(
Expand Down Expand Up @@ -103,7 +103,7 @@ fn create_lookup_table_common(
(instruction, lookup_table_address)
}

#[cfg(all(feature = "bincode", any(feature = "curve25519", target_os = "solana")))]
#[cfg(all(feature = "bincode", any(all(feature = "curve25519", feature = "sha2"), target_os = "solana")))]
/// Constructs an instruction to create a table account and returns
/// the instruction and the table account's derived address.
///
Expand All @@ -120,7 +120,7 @@ pub fn create_lookup_table_signed(
create_lookup_table_common(authority_address, payer_address, recent_slot, true)
}

#[cfg(all(feature = "bincode", any(feature = "curve25519", target_os = "solana")))]
#[cfg(all(feature = "bincode", any(all(feature = "curve25519", feature = "sha2"), target_os = "solana")))]
/// Constructs an instruction to create a table account and returns
/// the instruction and the table account's derived address.
///
Expand Down
12 changes: 6 additions & 6 deletions sdk/program-core/src/bpf_loader_upgradeable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//! [`loader_upgradeable_instruction`]: crate::loader_upgradeable_instruction
use crate::pubkey::Pubkey;
#[cfg(all(feature = "bincode", any(feature = "curve25519", target_os = "solana")))]
#[cfg(all(feature = "bincode", any(all(feature = "curve25519", feature = "sha2"), target_os = "solana")))]
use crate::sysvar;
#[cfg(feature = "bincode")]
use crate::{
Expand Down Expand Up @@ -141,7 +141,7 @@ pub fn write(
)
}

#[cfg(all(feature = "bincode", any(feature = "curve25519", target_os = "solana")))]
#[cfg(all(feature = "bincode", any(all(feature = "curve25519", feature = "sha2"), target_os = "solana")))]
/// Returns the instructions required to deploy a program with a specified
/// maximum program length. The maximum length must be large enough to
/// accommodate any future upgrades.
Expand Down Expand Up @@ -179,7 +179,7 @@ pub fn deploy_with_max_program_len(
])
}

#[cfg(all(feature = "bincode", any(feature = "curve25519", target_os = "solana")))]
#[cfg(all(feature = "bincode", any(all(feature = "curve25519", feature = "sha2"), target_os = "solana")))]
/// Returns the instructions required to upgrade a program.
pub fn upgrade(
program_address: &Pubkey,
Expand Down Expand Up @@ -256,7 +256,7 @@ pub fn set_buffer_authority_checked(
)
}

#[cfg(all(feature = "bincode", any(feature = "curve25519", target_os = "solana")))]
#[cfg(all(feature = "bincode", any(all(feature = "curve25519", feature = "sha2"), target_os = "solana")))]
/// Returns the instructions required to set a program's authority.
pub fn set_upgrade_authority(
program_address: &Pubkey,
Expand All @@ -275,7 +275,7 @@ pub fn set_upgrade_authority(
Instruction::new_with_bincode(id(), &UpgradeableLoaderInstruction::SetAuthority, metas)
}

#[cfg(all(feature = "bincode", any(feature = "curve25519", target_os = "solana")))]
#[cfg(all(feature = "bincode", any(all(feature = "curve25519", feature = "sha2"), target_os = "solana")))]
/// Returns the instructions required to set a program's authority. If using this instruction, the new authority
/// must sign.
pub fn set_upgrade_authority_checked(
Expand Down Expand Up @@ -333,7 +333,7 @@ pub fn close_any(
Instruction::new_with_bincode(id(), &UpgradeableLoaderInstruction::Close, metas)
}

#[cfg(all(feature = "bincode", any(feature = "curve25519", target_os = "solana")))]
#[cfg(all(feature = "bincode", any(all(feature = "curve25519", feature = "sha2"), target_os = "solana")))]
/// Returns the instruction required to extend the size of a program's
/// executable data account
pub fn extend_program(
Expand Down

0 comments on commit cc6e753

Please sign in to comment.