diff --git a/core/src/validator.rs b/core/src/validator.rs index db4547143..844177c83 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -734,7 +734,7 @@ impl Validator { let last_full_snapshot_slot = starting_snapshot_hashes.map(|x| x.full.0 .0); let accounts_background_service = AccountsBackgroundService::new( bank_forks.clone(), - &exit, + exit.clone(), AbsRequestHandlers { snapshot_request_handler, pruned_banks_request_handler, diff --git a/core/tests/epoch_accounts_hash.rs b/core/tests/epoch_accounts_hash.rs index 71c89ee36..dbb1ee6f9 100755 --- a/core/tests/epoch_accounts_hash.rs +++ b/core/tests/epoch_accounts_hash.rs @@ -217,7 +217,7 @@ impl BackgroundServices { }; let accounts_background_service = AccountsBackgroundService::new( bank_forks, - &exit, + exit.clone(), AbsRequestHandlers { snapshot_request_handler, pruned_banks_request_handler, diff --git a/core/tests/snapshots.rs b/core/tests/snapshots.rs index 815d41c4d..3ed678a04 100644 --- a/core/tests/snapshots.rs +++ b/core/tests/snapshots.rs @@ -1009,8 +1009,13 @@ fn test_snapshots_with_background_services( snapshot_test_config.snapshot_config.clone(), ); - let accounts_background_service = - AccountsBackgroundService::new(bank_forks.clone(), &exit, abs_request_handler, false, None); + let accounts_background_service = AccountsBackgroundService::new( + bank_forks.clone(), + exit.clone(), + abs_request_handler, + false, + None, + ); let mut last_full_snapshot_slot = None; let mut last_incremental_snapshot_slot = None; diff --git a/ledger-tool/src/main.rs b/ledger-tool/src/main.rs index 9a2c99ae5..d00d2972f 100644 --- a/ledger-tool/src/main.rs +++ b/ledger-tool/src/main.rs @@ -1282,7 +1282,7 @@ fn load_bank_forks( let exit = Arc::new(AtomicBool::new(false)); let accounts_background_service = AccountsBackgroundService::new( bank_forks.clone(), - &exit, + exit.clone(), abs_request_handler, process_options.accounts_db_test_hash_calculation, None, diff --git a/runtime/src/accounts_background_service.rs b/runtime/src/accounts_background_service.rs index e65a98fb4..b6f1e0c2a 100644 --- a/runtime/src/accounts_background_service.rs +++ b/runtime/src/accounts_background_service.rs @@ -529,12 +529,11 @@ pub struct AccountsBackgroundService { impl AccountsBackgroundService { pub fn new( bank_forks: Arc>, - exit: &Arc, + exit: Arc, request_handlers: AbsRequestHandlers, test_hash_calculation: bool, mut last_full_snapshot_slot: Option, ) -> Self { - let exit = exit.clone(); let mut last_cleaned_block_height = 0; let mut removed_slots_count = 0; let mut total_remove_slots_time = 0;