Remove Copy from AccountsIndexConfig. Not all types will support it (#19686)

This commit is contained in:
Jeff Washington (jwash) 2021-09-07 20:09:40 -05:00 committed by GitHub
parent 16ab273bf6
commit d3f938f0cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -1171,7 +1171,7 @@ fn new_banks_from_ledger(
debug_keys: config.debug_keys.clone(),
account_indexes: config.account_indexes.clone(),
accounts_db_caching_enabled: config.accounts_db_caching_enabled,
accounts_index_config: config.accounts_index_config,
accounts_index_config: config.accounts_index_config.clone(),
shrink_ratio: config.accounts_shrink_ratio,
accounts_db_test_hash_calculation: config.accounts_db_test_hash_calculation,
accounts_db_skip_shrink: config.accounts_db_skip_shrink,

View File

@ -157,7 +157,7 @@ fn load_from_snapshot(
process_options.accounts_db_test_hash_calculation,
process_options.accounts_db_skip_shrink,
process_options.verify_index,
process_options.accounts_index_config,
process_options.accounts_index_config.clone(),
)
.expect("Load from snapshot failed");

View File

@ -504,7 +504,7 @@ pub fn process_blockstore(
opts.accounts_db_caching_enabled,
opts.shrink_ratio,
false,
opts.accounts_index_config,
opts.accounts_index_config.clone(),
);
let bank0 = Arc::new(bank0);
info!("processing ledger for slot 0...");

View File

@ -58,7 +58,7 @@ pub fn safe_clone_config(config: &ValidatorConfig) -> ValidatorConfig {
poh_hashes_per_batch: config.poh_hashes_per_batch,
no_wait_for_vote_to_start_leader: config.no_wait_for_vote_to_start_leader,
accounts_shrink_ratio: config.accounts_shrink_ratio,
accounts_index_config: config.accounts_index_config,
accounts_index_config: config.accounts_index_config.clone(),
}
}

View File

@ -81,7 +81,7 @@ pub struct AccountSecondaryIndexesIncludeExclude {
pub keys: HashSet<Pubkey>,
}
#[derive(Debug, Default, Clone, Copy)]
#[derive(Debug, Default, Clone)]
pub struct AccountsIndexConfig {
pub bins: Option<usize>,
}