Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Removes base from IncrementalSnapshotHash (#31185)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Apr 13, 2023
1 parent e05957d commit 1f67591
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl SnapshotGossipManager {
if let Some(starting_incremental_snapshot_hash) = starting_snapshot_hashes.incremental {
self.update_latest_incremental_snapshot_hash(
starting_incremental_snapshot_hash.hash,
starting_incremental_snapshot_hash.base.0,
starting_snapshot_hashes.full.hash.0,
);
}
self.push_latest_snapshot_hashes_to_cluster();
Expand Down
1 change: 0 additions & 1 deletion ledger/src/bank_forks_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ fn bank_forks_from_snapshot(
let starting_incremental_snapshot_hash =
incremental_snapshot_archive_info.map(|incremental_snapshot_archive_info| {
IncrementalSnapshotHash {
base: full_snapshot_hash.hash,
hash: (
incremental_snapshot_archive_info.slot(),
*incremental_snapshot_archive_info.hash(),
Expand Down
4 changes: 1 addition & 3 deletions runtime/src/snapshot_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ pub struct FullSnapshotHash {
}

/// Used by SnapshotPackagerService and SnapshotGossipManager, this struct adds type safety to
/// ensure an incremental snapshot hash is pushed to the right CRDS. `base` is the (full) snapshot
/// this incremental snapshot (`hash`) is based on.
/// ensure an incremental snapshot hash is pushed to the right CRDS.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct IncrementalSnapshotHash {
pub base: (Slot, SnapshotHash),
pub hash: (Slot, SnapshotHash),
}

Expand Down

0 comments on commit 1f67591

Please sign in to comment.