From 79739e1b787d971c1c5912416446244710ebc09e Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Sat, 9 Dec 2023 01:17:17 +0800 Subject: [PATCH] Comment sysvar and builtin lists as deprecated and remove new keys (#34365) --- sdk/program/src/message/legacy.rs | 2 +- sdk/program/src/sysvar/mod.rs | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/sdk/program/src/message/legacy.rs b/sdk/program/src/message/legacy.rs index 868cb9bc94df49..c472c6ca4dbba1 100644 --- a/sdk/program/src/message/legacy.rs +++ b/sdk/program/src/message/legacy.rs @@ -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(); [ diff --git a/sdk/program/src/sysvar/mod.rs b/sdk/program/src/sysvar/mod.rs index 1bb7c12b33a728..5a5afec8bcf8a3 100644 --- a/sdk/program/src/sysvar/mod.rs +++ b/sdk/program/src/sysvar/mod.rs @@ -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 = vec![ clock::id(), epoch_schedule::id(), @@ -113,8 +114,6 @@ lazy_static! { slot_history::id(), stake_history::id(), instructions::id(), - epoch_rewards::id(), - last_restart_slot::id(), ]; } @@ -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); - } ) ); @@ -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); - } ) );