Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Comment sysvar and builtin lists as deprecated and remove new keys #34365

Merged
merged 1 commit into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/program/src/message/legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use {
};

lazy_static! {
// Copied keys over since direct references create cyclical dependency.
// This will be deprecated and so this list shouldn't be modified
pub static ref BUILTIN_PROGRAMS_KEYS: [Pubkey; 10] = {
let parse = |s| Pubkey::from_str(s).unwrap();
[
Expand Down
15 changes: 1 addition & 14 deletions sdk/program/src/sysvar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ pub mod slot_history;
pub mod stake_history;

lazy_static! {
// This will be deprecated and so this list shouldn't be modified
pub static ref ALL_IDS: Vec<Pubkey> = vec![
clock::id(),
epoch_schedule::id(),
Expand All @@ -113,8 +114,6 @@ lazy_static! {
slot_history::id(),
stake_history::id(),
instructions::id(),
epoch_rewards::id(),
last_restart_slot::id(),
];
}

Expand All @@ -138,12 +137,6 @@ macro_rules! declare_sysvar_id(
check_id(pubkey)
}
}

#[cfg(test)]
#[test]
fn test_sysvar_id() {
assert!($crate::sysvar::is_sysvar_id(&id()), "sysvar::is_sysvar_id() doesn't know about {}", $name);
}
)
);

Expand All @@ -164,12 +157,6 @@ macro_rules! declare_deprecated_sysvar_id(
check_id(pubkey)
}
}

#[cfg(test)]
#[test]
fn test_sysvar_id() {
assert!($crate::sysvar::is_sysvar_id(&id()), "sysvar::is_sysvar_id() doesn't know about {}", $name);
}
)
);

Expand Down