all TestValdiators act like validators (#23318)
This commit is contained in:
committed by
GitHub
parent
39c86c6c44
commit
2207e49633
@ -109,7 +109,6 @@ pub struct TestValidatorGenesis {
|
|||||||
pub accountsdb_plugin_config_files: Option<Vec<PathBuf>>,
|
pub accountsdb_plugin_config_files: Option<Vec<PathBuf>>,
|
||||||
pub accounts_db_caching_enabled: bool,
|
pub accounts_db_caching_enabled: bool,
|
||||||
deactivate_feature_set: HashSet<Pubkey>,
|
deactivate_feature_set: HashSet<Pubkey>,
|
||||||
pub started_from_validator: bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for TestValidatorGenesis {
|
impl Default for TestValidatorGenesis {
|
||||||
@ -137,7 +136,6 @@ impl Default for TestValidatorGenesis {
|
|||||||
accountsdb_plugin_config_files: Option::<Vec<PathBuf>>::default(),
|
accountsdb_plugin_config_files: Option::<Vec<PathBuf>>::default(),
|
||||||
accounts_db_caching_enabled: bool::default(),
|
accounts_db_caching_enabled: bool::default(),
|
||||||
deactivate_feature_set: HashSet::<Pubkey>::default(),
|
deactivate_feature_set: HashSet::<Pubkey>::default(),
|
||||||
started_from_validator: false,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -658,17 +656,13 @@ impl TestValidator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let accounts_db_config = if config.started_from_validator {
|
let accounts_db_config = Some(AccountsDbConfig {
|
||||||
Some(AccountsDbConfig {
|
index: Some(AccountsIndexConfig {
|
||||||
index: Some(AccountsIndexConfig {
|
started_from_validator: true,
|
||||||
started_from_validator: config.started_from_validator,
|
..AccountsIndexConfig::default()
|
||||||
..AccountsIndexConfig::default()
|
}),
|
||||||
}),
|
..AccountsDbConfig::default()
|
||||||
..AccountsDbConfig::default()
|
});
|
||||||
})
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
};
|
|
||||||
|
|
||||||
let mut validator_config = ValidatorConfig {
|
let mut validator_config = ValidatorConfig {
|
||||||
accountsdb_plugin_config_files: config.accountsdb_plugin_config_files.clone(),
|
accountsdb_plugin_config_files: config.accountsdb_plugin_config_files.clone(),
|
||||||
|
@ -582,8 +582,6 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let mut genesis = TestValidatorGenesis::default();
|
let mut genesis = TestValidatorGenesis::default();
|
||||||
// this startup path should act like we started from a validator
|
|
||||||
genesis.started_from_validator = true;
|
|
||||||
genesis.max_ledger_shreds = value_of(&matches, "limit_ledger_size");
|
genesis.max_ledger_shreds = value_of(&matches, "limit_ledger_size");
|
||||||
genesis.max_genesis_archive_unpacked_size = Some(u64::MAX);
|
genesis.max_genesis_archive_unpacked_size = Some(u64::MAX);
|
||||||
genesis.accounts_db_caching_enabled = !matches.is_present("no_accounts_db_caching");
|
genesis.accounts_db_caching_enabled = !matches.is_present("no_accounts_db_caching");
|
||||||
|
Reference in New Issue
Block a user