Add GenesisBlock::OperatingMode to control how cluster features are activated (#6430)

This commit is contained in:
Michael Vines
2019-10-23 11:50:10 -07:00
committed by GitHub
parent 35d6196384
commit 35cc74ef25
13 changed files with 256 additions and 46 deletions

View File

@ -21,6 +21,12 @@ use std::{
path::Path,
};
#[derive(Serialize, Deserialize, Debug, Clone, Copy)]
pub enum OperatingMode {
SoftLaunch, // Cluster features incrementally enabled over time
Development, // All features (including experimental features) available immediately from genesis
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct GenesisBlock {
pub accounts: Vec<(Pubkey, Account)>,
@ -33,6 +39,7 @@ pub struct GenesisBlock {
pub rent_calculator: RentCalculator,
pub inflation: Inflation,
pub epoch_schedule: EpochSchedule,
pub operating_mode: OperatingMode,
}
// useful for basic tests
@ -63,6 +70,7 @@ impl Default for GenesisBlock {
fee_calculator: FeeCalculator::default(),
rent_calculator: RentCalculator::default(),
epoch_schedule: EpochSchedule::default(),
operating_mode: OperatingMode::Development,
}
}
}