Skip to content

Commit

Permalink
Comment sysvar and builtin lists as deprecated and remove new keys (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
jstarry authored Dec 8, 2023
1 parent c43edd2 commit 79739e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
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

0 comments on commit 79739e1

Please sign in to comment.