Port BPFLoader2 activation to FeatureSet and rework built-in program activation
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
//! A command-line executable for generating the chain's genesis config.
|
||||
|
||||
#[macro_use]
|
||||
extern crate solana_budget_program;
|
||||
#[macro_use]
|
||||
extern crate solana_exchange_program;
|
||||
#[macro_use]
|
||||
extern crate solana_vest_program;
|
||||
|
||||
use clap::{crate_description, crate_name, value_t, value_t_or_exit, App, Arg, ArgMatches};
|
||||
use solana_clap_utils::{
|
||||
input_parsers::{cluster_type_of, pubkey_of, pubkeys_of, unix_timestamp_from_rfc3339_datetime},
|
||||
@@ -462,8 +469,15 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
matches.is_present("enable_warmup_epochs"),
|
||||
);
|
||||
|
||||
let native_instruction_processors =
|
||||
solana_genesis_programs::get_native_programs_for_genesis(cluster_type);
|
||||
let native_instruction_processors = if cluster_type == ClusterType::Development {
|
||||
vec![
|
||||
solana_vest_program!(),
|
||||
solana_budget_program!(),
|
||||
solana_exchange_program!(),
|
||||
]
|
||||
} else {
|
||||
vec![]
|
||||
};
|
||||
|
||||
let mut genesis_config = GenesisConfig {
|
||||
native_instruction_processors,
|
||||
@@ -526,7 +540,9 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
}
|
||||
|
||||
solana_stake_program::add_genesis_accounts(&mut genesis_config);
|
||||
solana_runtime::genesis_utils::add_feature_accounts(&mut genesis_config);
|
||||
if genesis_config.cluster_type == ClusterType::Development {
|
||||
solana_runtime::genesis_utils::activate_all_features(&mut genesis_config);
|
||||
}
|
||||
|
||||
if let Some(files) = matches.values_of("primordial_accounts_file") {
|
||||
for file in files {
|
||||
|
Reference in New Issue
Block a user