Use Arc instead of &Arc in SnapshotPackagerService::new (#31270)

This commit is contained in:
Brooks 2023-04-19 11:09:49 -04:00 committed by GitHub
parent 8162358b8b
commit 1d14156832
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 12 deletions

View File

@ -34,13 +34,11 @@ impl SnapshotPackagerService {
snapshot_package_sender: Sender<SnapshotPackage>,
snapshot_package_receiver: Receiver<SnapshotPackage>,
starting_snapshot_hashes: Option<StartingSnapshotHashes>,
exit: &Arc<AtomicBool>,
cluster_info: &Arc<ClusterInfo>,
exit: Arc<AtomicBool>,
cluster_info: Arc<ClusterInfo>,
snapshot_config: SnapshotConfig,
enable_gossip_push: bool,
) -> Self {
let exit = exit.clone();
let cluster_info = cluster_info.clone();
let max_full_snapshot_hashes = std::cmp::min(
MAX_LEGACY_SNAPSHOT_HASHES,
snapshot_config

View File

@ -693,8 +693,8 @@ impl Validator {
snapshot_package_sender.clone(),
snapshot_package_receiver,
starting_snapshot_hashes,
&exit,
&cluster_info,
exit.clone(),
cluster_info.clone(),
config.snapshot_config.clone(),
enable_gossip_push,
);

View File

@ -184,8 +184,8 @@ impl BackgroundServices {
snapshot_package_sender.clone(),
snapshot_package_receiver,
None,
&exit,
&cluster_info,
exit.clone(),
cluster_info.clone(),
snapshot_config.clone(),
false,
);

View File

@ -509,8 +509,8 @@ fn test_concurrent_snapshot_packaging(
snapshot_package_sender.clone(),
snapshot_package_receiver,
None,
&exit,
&cluster_info,
exit.clone(),
cluster_info,
snapshot_config.clone(),
true,
);
@ -991,8 +991,8 @@ fn test_snapshots_with_background_services(
snapshot_package_sender.clone(),
snapshot_package_receiver,
None,
&exit,
&cluster_info,
exit.clone(),
cluster_info.clone(),
snapshot_test_config.snapshot_config.clone(),
false,
);