AccountsIndexConfig -> AccountsDbConfig (#19687)
This commit is contained in:
committed by
GitHub
parent
590e113f16
commit
456bf15012
@@ -1,7 +1,7 @@
|
||||
use {
|
||||
crate::{
|
||||
accounts_db::AccountShrinkThreshold,
|
||||
accounts_index::{AccountSecondaryIndexes, AccountsIndexConfig},
|
||||
accounts_db::{AccountShrinkThreshold, AccountsDbConfig},
|
||||
accounts_index::AccountSecondaryIndexes,
|
||||
bank::{Bank, BankSlotDelta},
|
||||
builtins::Builtins,
|
||||
hardened_unpack::{unpack_snapshot, ParallelSelector, UnpackError, UnpackedAppendVecMap},
|
||||
@@ -732,7 +732,7 @@ pub fn bank_from_snapshot_archives(
|
||||
test_hash_calculation: bool,
|
||||
accounts_db_skip_shrink: bool,
|
||||
verify_index: bool,
|
||||
accounts_index_config: Option<AccountsIndexConfig>,
|
||||
accounts_db_config: Option<AccountsDbConfig>,
|
||||
) -> Result<(Bank, BankFromArchiveTimings)> {
|
||||
check_are_snapshots_compatible(
|
||||
full_snapshot_archive_info,
|
||||
@@ -796,7 +796,7 @@ pub fn bank_from_snapshot_archives(
|
||||
limit_load_slot_count_from_snapshot,
|
||||
shrink_ratio,
|
||||
verify_index,
|
||||
accounts_index_config,
|
||||
accounts_db_config,
|
||||
)?;
|
||||
measure_rebuild.stop();
|
||||
info!("{}", measure_rebuild);
|
||||
@@ -842,7 +842,7 @@ pub fn bank_from_latest_snapshot_archives(
|
||||
test_hash_calculation: bool,
|
||||
accounts_db_skip_shrink: bool,
|
||||
verify_index: bool,
|
||||
accounts_index_config: Option<AccountsIndexConfig>,
|
||||
accounts_db_config: Option<AccountsDbConfig>,
|
||||
) -> Result<(
|
||||
Bank,
|
||||
BankFromArchiveTimings,
|
||||
@@ -885,7 +885,7 @@ pub fn bank_from_latest_snapshot_archives(
|
||||
test_hash_calculation,
|
||||
accounts_db_skip_shrink,
|
||||
verify_index,
|
||||
accounts_index_config,
|
||||
accounts_db_config,
|
||||
)?;
|
||||
|
||||
verify_bank_against_expected_slot_hash(
|
||||
@@ -1421,7 +1421,7 @@ fn rebuild_bank_from_snapshots(
|
||||
limit_load_slot_count_from_snapshot: Option<usize>,
|
||||
shrink_ratio: AccountShrinkThreshold,
|
||||
verify_index: bool,
|
||||
accounts_index_config: Option<AccountsIndexConfig>,
|
||||
accounts_db_config: Option<AccountsDbConfig>,
|
||||
) -> Result<Bank> {
|
||||
let (full_snapshot_version, full_snapshot_root_paths) =
|
||||
verify_unpacked_snapshots_dir_and_version(
|
||||
@@ -1469,7 +1469,7 @@ fn rebuild_bank_from_snapshots(
|
||||
limit_load_slot_count_from_snapshot,
|
||||
shrink_ratio,
|
||||
verify_index,
|
||||
accounts_index_config,
|
||||
accounts_db_config,
|
||||
),
|
||||
}?,
|
||||
)
|
||||
@@ -1814,6 +1814,7 @@ pub fn should_take_incremental_snapshot(
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::accounts_db::ACCOUNTS_DB_CONFIG_FOR_TESTING;
|
||||
use assert_matches::assert_matches;
|
||||
use bincode::{deserialize_from, serialize_into};
|
||||
use solana_sdk::{
|
||||
@@ -2606,7 +2607,7 @@ mod tests {
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
Some(crate::accounts_index::ACCOUNTS_INDEX_CONFIG_FOR_TESTING),
|
||||
Some(ACCOUNTS_DB_CONFIG_FOR_TESTING),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -2697,7 +2698,7 @@ mod tests {
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
Some(crate::accounts_index::ACCOUNTS_INDEX_CONFIG_FOR_TESTING),
|
||||
Some(ACCOUNTS_DB_CONFIG_FOR_TESTING),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -2807,7 +2808,7 @@ mod tests {
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
Some(crate::accounts_index::ACCOUNTS_INDEX_CONFIG_FOR_TESTING),
|
||||
Some(ACCOUNTS_DB_CONFIG_FOR_TESTING),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -2906,7 +2907,7 @@ mod tests {
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
Some(crate::accounts_index::ACCOUNTS_INDEX_CONFIG_FOR_TESTING),
|
||||
Some(ACCOUNTS_DB_CONFIG_FOR_TESTING),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -3047,7 +3048,7 @@ mod tests {
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
Some(crate::accounts_index::ACCOUNTS_INDEX_CONFIG_FOR_TESTING),
|
||||
Some(ACCOUNTS_DB_CONFIG_FOR_TESTING),
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
@@ -3109,7 +3110,7 @@ mod tests {
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
Some(crate::accounts_index::ACCOUNTS_INDEX_CONFIG_FOR_TESTING),
|
||||
Some(ACCOUNTS_DB_CONFIG_FOR_TESTING),
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
|
Reference in New Issue
Block a user