|
|
@@ -28,6 +28,7 @@ use {
|
|
|
cluster_info::{BindIpAddrs, ClusterInfo, Node, NodeConfig},
|
|
|
contact_info::Protocol,
|
|
|
},
|
|
|
+ solana_inflation::Inflation,
|
|
|
solana_instruction::{AccountMeta, Instruction},
|
|
|
solana_keypair::{read_keypair_file, write_keypair_file, Keypair},
|
|
|
solana_ledger::{
|
|
|
@@ -121,6 +122,7 @@ pub struct TestValidatorGenesis {
|
|
|
upgradeable_programs: Vec<UpgradeableProgramInfo>,
|
|
|
ticks_per_slot: Option<u64>,
|
|
|
epoch_schedule: Option<EpochSchedule>,
|
|
|
+ inflation: Option<Inflation>,
|
|
|
node_config: TestValidatorNodeConfig,
|
|
|
pub validator_exit: Arc<RwLock<Exit>>,
|
|
|
pub start_progress: Arc<RwLock<ValidatorStartProgress>>,
|
|
|
@@ -153,6 +155,7 @@ impl Default for TestValidatorGenesis {
|
|
|
upgradeable_programs: Vec::<UpgradeableProgramInfo>::default(),
|
|
|
ticks_per_slot: Option::<u64>::default(),
|
|
|
epoch_schedule: Option::<EpochSchedule>::default(),
|
|
|
+ inflation: Option::<Inflation>::default(),
|
|
|
node_config: TestValidatorNodeConfig::default(),
|
|
|
validator_exit: Arc::<RwLock<Exit>>::default(),
|
|
|
start_progress: Arc::<RwLock<ValidatorStartProgress>>::default(),
|
|
|
@@ -252,6 +255,11 @@ impl TestValidatorGenesis {
|
|
|
self
|
|
|
}
|
|
|
|
|
|
+ pub fn inflation(&mut self, inflation: Inflation) -> &mut Self {
|
|
|
+ self.inflation = Some(inflation);
|
|
|
+ self
|
|
|
+ }
|
|
|
+
|
|
|
pub fn rent(&mut self, rent: Rent) -> &mut Self {
|
|
|
self.rent = rent;
|
|
|
self
|
|
|
@@ -945,6 +953,10 @@ impl TestValidator {
|
|
|
genesis_config.ticks_per_slot = ticks_per_slot;
|
|
|
}
|
|
|
|
|
|
+ if let Some(inflation) = config.inflation {
|
|
|
+ genesis_config.inflation = inflation;
|
|
|
+ }
|
|
|
+
|
|
|
for feature in feature_set {
|
|
|
genesis_utils::activate_feature(&mut genesis_config, feature);
|
|
|
}
|