Create development vs softlaunch environment hooks into net scripts (#6974)
This commit is contained in:
@ -111,6 +111,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
&timing::duration_as_ms(&PohConfig::default().target_tick_duration).to_string();
|
||||
let default_ticks_per_slot = &clock::DEFAULT_TICKS_PER_SLOT.to_string();
|
||||
let default_slots_per_epoch = &EpochSchedule::default().slots_per_epoch.to_string();
|
||||
let default_operating_mode = "softlaunch";
|
||||
|
||||
let matches = App::new(crate_name!())
|
||||
.about(crate_description!())
|
||||
@ -296,9 +297,16 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
.help("The location of pubkey for primordial accounts and balance"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("development")
|
||||
.long("dev")
|
||||
.help("Configure the cluster for development mode where all features are available at epoch 0"),
|
||||
Arg::with_name("operating_mode")
|
||||
.long("operating-mode")
|
||||
.possible_value("development")
|
||||
.possible_value("softlaunch")
|
||||
.takes_value(true)
|
||||
.default_value(default_operating_mode)
|
||||
.help(
|
||||
"Configure the cluster for \"development\" mode where all features are available at epoch 0, \
|
||||
or \"softlaunch\" mode where some features are disabled at epoch 0"
|
||||
),
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
@ -381,7 +389,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
}
|
||||
}
|
||||
|
||||
let operating_mode = if matches.is_present("development") {
|
||||
let operating_mode = if matches.value_of("operating_mode").unwrap() == "development" {
|
||||
OperatingMode::Development
|
||||
} else {
|
||||
OperatingMode::SoftLaunch
|
||||
|
Reference in New Issue
Block a user