diff --git a/sdk/src/reserved_account_keys.rs b/sdk/src/reserved_account_keys.rs index 90ba8f3b816ae4..acfe008b4a65df 100644 --- a/sdk/src/reserved_account_keys.rs +++ b/sdk/src/reserved_account_keys.rs @@ -17,21 +17,13 @@ use { std::collections::HashSet, }; -// Temporary until a zk token program module is added to the sdk +// Inline zk token program id since it isn't available in the sdk mod zk_token_proof_program { solana_sdk::declare_id!("ZkTokenProof1111111111111111111111111111111"); } pub struct ReservedAccountKeys; impl ReservedAccountKeys { - /// Compute a set of all reserved keys, regardless of if they are active or not - pub fn active_and_inactive() -> HashSet { - RESERVED_ACCOUNT_KEYS - .iter() - .map(|reserved_key| reserved_key.key) - .collect() - } - /// Compute the active set of reserved keys based on activated features pub fn active(feature_set: &FeatureSet) -> HashSet { Self::compute_active(&RESERVED_ACCOUNT_KEYS, feature_set) @@ -49,6 +41,16 @@ impl ReservedAccountKeys { .collect() } + /// Compute a set of all reserved keys, regardless of if they are active or not. + /// Since this method doesn't take into account which reserved keys are active, + /// it should not be used by the runtime. + pub fn active_and_inactive() -> HashSet { + RESERVED_ACCOUNT_KEYS + .iter() + .map(|reserved_key| reserved_key.key) + .collect() + } + /// Return an empty list of reserved keys for visibility when using in /// places where the dynamic reserved key set is not available pub fn empty() -> HashSet {