Skip to content

Commit

Permalink
Removes unused arg from SnapshotGossipManager::new() (solana-labs#31169)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored and jeffwashington committed Apr 14, 2023
1 parent 322a6f3 commit 2ee7f7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
11 changes: 1 addition & 10 deletions core/src/snapshot_packager_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ mod snapshot_gossip_manager;
use {
crossbeam_channel::{Receiver, Sender},
snapshot_gossip_manager::SnapshotGossipManager,
solana_gossip::cluster_info::{
ClusterInfo, MAX_INCREMENTAL_SNAPSHOT_HASHES, MAX_LEGACY_SNAPSHOT_HASHES,
},
solana_gossip::cluster_info::{ClusterInfo, MAX_LEGACY_SNAPSHOT_HASHES},
solana_measure::measure_us,
solana_perf::thread::renice_this_thread,
solana_runtime::{
Expand Down Expand Up @@ -49,12 +47,6 @@ impl SnapshotPackagerService {
.maximum_full_snapshot_archives_to_retain
.get(),
);
let max_incremental_snapshot_hashes = std::cmp::min(
MAX_INCREMENTAL_SNAPSHOT_HASHES,
snapshot_config
.maximum_incremental_snapshot_archives_to_retain
.get(),
);

let t_snapshot_packager = Builder::new()
.name("solSnapshotPkgr".to_string())
Expand All @@ -65,7 +57,6 @@ impl SnapshotPackagerService {
SnapshotGossipManager::new(
cluster_info,
max_full_snapshot_hashes,
max_incremental_snapshot_hashes,
)
);
if let Some(snapshot_gossip_manager) = snapshot_gossip_manager.as_mut() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ pub struct SnapshotGossipManager {
impl SnapshotGossipManager {
/// Construct a new SnapshotGossipManager with empty snapshot hashes
#[must_use]
pub fn new(
cluster_info: Arc<ClusterInfo>,
max_full_snapshot_hashes: usize,
_max_incremental_snapshot_hashes: usize,
) -> Self {
pub fn new(cluster_info: Arc<ClusterInfo>, max_full_snapshot_hashes: usize) -> Self {
SnapshotGossipManager {
cluster_info,
latest_snapshot_hashes: None,
Expand Down

0 comments on commit 2ee7f7c

Please sign in to comment.