Removes `base` from `IncrementalSnapshotHash` (#31185)

This commit is contained in:
Brooks 2023-04-13 13:35:35 -04:00 committed by GitHub
parent e05957d8fa
commit 1f67591e21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 5 deletions

View File

@ -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();

View File

@ -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(),

View File

@ -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),
}