Pipe FeatureSet though InvokeContext (#12536)

* Pipe FeatureSet though InvokeContext

* gate program size cap

* nit
This commit is contained in:
Jack May
2020-09-29 14:36:30 -07:00
committed by GitHub
parent ce98088457
commit 74fcb184b2
9 changed files with 124 additions and 180 deletions

View File

@@ -29,6 +29,10 @@ pub mod bpf_loader2_program {
solana_sdk::declare_id!("DFBnrgThdzH4W6wZ12uGPoWcMnvfZj11EHnxHcVxLPhD");
}
pub mod compute_budget_config2 {
solana_sdk::declare_id!("HxvjqDSiF5sYdSYuCXsUnS8UeAoWsMT9iGoFP8pgV1mB");
}
lazy_static! {
/// Map of feature identifiers to user-visible description
pub static ref FEATURE_NAMES: HashMap<Pubkey, &'static str> = [
@@ -38,6 +42,7 @@ lazy_static! {
(pico_inflation::id(), "pico-inflation"),
(spl_token_v2_multisig_fix::id(), "spl-token multisig fix"),
(bpf_loader2_program::id(), "bpf_loader2 program"),
(compute_budget_config2::id(), "1ms compute budget"),
/*************** ADD NEW FEATURES HERE ***************/
]
.iter()
@@ -78,12 +83,3 @@ impl Default for FeatureSet {
}
}
}
impl FeatureSet {
pub fn enabled() -> Self {
Self {
active: FEATURE_NAMES.keys().cloned().collect(),
inactive: HashSet::new(),
}
}
}