remove ValidatorConfig.caching_enabled (#29172)

This commit is contained in:
Jeff Washington (jwash) 2022-12-09 13:31:55 -06:00 committed by GitHub
parent ffcebbbd9b
commit 560143a267
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 2 additions and 10 deletions

View File

@ -63,7 +63,6 @@ fn test_bench_tps_local_cluster(config: Config) {
cluster_lamports: 200_000_000,
validator_configs: make_identical_validator_configs(
&ValidatorConfig {
accounts_db_caching_enabled: true,
rpc_config: JsonRpcConfig {
faucet_addr: Some(faucet_addr),
..JsonRpcConfig::default_for_test()

View File

@ -162,7 +162,6 @@ pub struct ValidatorConfig {
pub poh_hashes_per_batch: u64,
pub process_ledger_before_services: bool,
pub account_indexes: AccountSecondaryIndexes,
pub accounts_db_caching_enabled: bool,
pub accounts_db_config: Option<AccountsDbConfig>,
pub warp_slot: Option<Slot>,
pub accounts_db_test_hash_calculation: bool,
@ -224,7 +223,6 @@ impl Default for ValidatorConfig {
poh_hashes_per_batch: poh_service::DEFAULT_HASHES_PER_BATCH,
process_ledger_before_services: false,
account_indexes: AccountSecondaryIndexes::default(),
accounts_db_caching_enabled: false,
warp_slot: None,
accounts_db_test_hash_calculation: false,
accounts_db_skip_shrink: false,
@ -245,7 +243,6 @@ impl Default for ValidatorConfig {
impl ValidatorConfig {
pub fn default_for_test() -> Self {
Self {
accounts_db_caching_enabled: true,
enforce_ulimit_nofile: false,
rpc_config: JsonRpcConfig::default_for_test(),
..Self::default()
@ -638,7 +635,7 @@ impl Validator {
snapshot_request_handler,
pruned_banks_request_handler,
},
config.accounts_db_caching_enabled,
true, // caching_enabled
config.accounts_db_test_hash_calculation,
last_full_snapshot_slot,
);
@ -1407,7 +1404,7 @@ fn load_blockstore(
new_hard_forks: config.new_hard_forks.clone(),
debug_keys: config.debug_keys.clone(),
account_indexes: config.account_indexes.clone(),
accounts_db_caching_enabled: config.accounts_db_caching_enabled,
accounts_db_caching_enabled: true,
accounts_db_config: config.accounts_db_config.clone(),
shrink_ratio: config.accounts_shrink_ratio,
accounts_db_test_hash_calculation: config.accounts_db_test_hash_calculation,

View File

@ -48,7 +48,6 @@ pub fn safe_clone_config(config: &ValidatorConfig) -> ValidatorConfig {
no_os_disk_stats_reporting: config.no_os_disk_stats_reporting,
poh_pinned_cpu_core: config.poh_pinned_cpu_core,
account_indexes: config.account_indexes.clone(),
accounts_db_caching_enabled: config.accounts_db_caching_enabled,
warp_slot: config.warp_slot,
accounts_db_test_hash_calculation: config.accounts_db_test_hash_calculation,
accounts_db_skip_shrink: config.accounts_db_skip_shrink,

View File

@ -2195,7 +2195,6 @@ fn test_hard_fork_with_gap_in_roots() {
let validator_config = ValidatorConfig {
snapshot_config: LocalCluster::create_dummy_load_only_snapshot_config(),
accounts_db_caching_enabled: true,
..ValidatorConfig::default()
};
let mut config = ClusterConfig {

View File

@ -794,7 +794,6 @@ impl TestValidator {
let mut validator_config = ValidatorConfig {
geyser_plugin_config_files: config.geyser_plugin_config_files.clone(),
accounts_db_caching_enabled: config.accounts_db_caching_enabled,
rpc_addrs: Some((
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), node.info.rpc.port()),
SocketAddr::new(

View File

@ -1131,7 +1131,6 @@ pub fn main() {
.unwrap_or(poh_service::DEFAULT_HASHES_PER_BATCH),
process_ledger_before_services: matches.is_present("process_ledger_before_services"),
account_indexes,
accounts_db_caching_enabled: true,
accounts_db_test_hash_calculation: matches.is_present("accounts_db_test_hash_calculation"),
accounts_db_config,
accounts_db_skip_shrink: matches.is_present("accounts_db_skip_shrink"),