diff --git a/ledger-tool/src/main.rs b/ledger-tool/src/main.rs index e75e222f0daace..3707edbe46f113 100644 --- a/ledger-tool/src/main.rs +++ b/ledger-tool/src/main.rs @@ -1093,7 +1093,7 @@ fn load_bank_forks( }; // For all account_paths, set up the run/ and snapshot/ sub directories. - let account_run_paths = account_paths.into_iter().map( + let account_run_paths: Vec = account_paths.into_iter().map( |account_path| { match setup_accounts_run_and_snapshot_paths(&account_path) { Ok(account_run_path) => account_run_path, diff --git a/runtime/src/accounts_background_service.rs b/runtime/src/accounts_background_service.rs index 3c2dafd02fc4aa..ef16a05d39b741 100644 --- a/runtime/src/accounts_background_service.rs +++ b/runtime/src/accounts_background_service.rs @@ -5,7 +5,7 @@ mod stats; use { crate::{ - accounts_db::{CalcAccountsHashDataSource, SnapshotStoragesOne}, + accounts_db::{AccountStorageEntry, CalcAccountsHashDataSource}, accounts_hash::CalcAccountsHashConfig, bank::{Bank, BankSlotDelta, DropCallback}, bank_forks::BankForks, @@ -141,6 +141,8 @@ pub struct SnapshotRequestHandler { pub accounts_package_sender: Sender, } +type AccountStorages = Vec>; + impl SnapshotRequestHandler { // Returns the latest requested snapshot slot, if one exists pub fn handle_snapshot_requests( @@ -148,7 +150,7 @@ impl SnapshotRequestHandler { test_hash_calculation: bool, non_snapshot_time_us: u128, last_full_snapshot_slot: &mut Option, - ) -> Option> { + ) -> Option> { let ( snapshot_request, accounts_package_type, @@ -265,7 +267,7 @@ impl SnapshotRequestHandler { last_full_snapshot_slot: &mut Option, snapshot_request: SnapshotRequest, accounts_package_type: AccountsPackageType, - ) -> Result<(u64, SnapshotStoragesOne), SnapshotError> { + ) -> Result<(u64, AccountStorages), SnapshotError> { debug!( "handling snapshot request: {:?}, {:?}", snapshot_request, accounts_package_type @@ -506,7 +508,7 @@ impl AbsRequestHandlers { test_hash_calculation: bool, non_snapshot_time_us: u128, last_full_snapshot_slot: &mut Option, - ) -> Option> { + ) -> Option> { self.snapshot_request_handler.handle_snapshot_requests( test_hash_calculation, non_snapshot_time_us, @@ -538,7 +540,7 @@ impl AccountsBackgroundService { .spawn(move || { let mut stats = StatsManager::new(); let mut last_snapshot_end_time = None; - let mut _last_snapshot_storages: Option = None; + let mut _last_snapshot_storages: Option = None; loop { if exit.load(Ordering::Relaxed) { break; diff --git a/runtime/src/snapshot_utils.rs b/runtime/src/snapshot_utils.rs index f6e29069ae4267..b4727e615feb9f 100644 --- a/runtime/src/snapshot_utils.rs +++ b/runtime/src/snapshot_utils.rs @@ -891,7 +891,7 @@ fn get_snapshot_accounts_hardlink_dir( fn hard_link_storages_to_snapshot( bank_snapshot_dir: impl AsRef, bank_slot: u64, - snapshot_storages: &[SnapshotStorageOne], + snapshot_storages: &[Arc], ) -> Result<()> { let accounts_hardlinks_dir = bank_snapshot_dir.as_ref().join("accounts_hardlinks"); fs::create_dir_all(&accounts_hardlinks_dir)?;