fn push_snapshot_hash(&mut self, snapshot_type: SnapshotType, snapshot_hash: (Slot, Hash)) {
        match snapshot_type {
            SnapshotType::FullSnapshot => {
                self.push_full_snapshot_hash(FullSnapshotHash {
                    hash: snapshot_hash,
                });
            }
            SnapshotType::IncrementalSnapshot(base_slot) => {
                let latest_full_snapshot_hash = *self.full_snapshot_hashes.hashes.last().unwrap();
                assert_eq!(
                    base_slot, latest_full_snapshot_hash.0,
                    "the incremental snapshot's base slot ({}) must match the latest full snapshot hash's slot ({})",
                    base_slot, latest_full_snapshot_hash.0,
                );
                self.push_incremental_snapshot_hash(IncrementalSnapshotHash {
                    base: latest_full_snapshot_hash,
                    hash: snapshot_hash,
                });
            }
        }
    }
/// Add `snapshot_hash` to its respective vector of hashes, then push that vector to the
/// cluster via CRDS.
Add `snapshot_hash` to its respective vector of hashes, then push that vector to the
cluster via CRDS.
Add ` snapshot_hash ` to its respective vector of hashes then push that vector to the cluster via CRDS .
fn push_snapshot_hash(&mut self, snapshot_type: SnapshotType, snapshot_hash: (Slot, Hash)) {
        match snapshot_type {
            SnapshotType::FullSnapshot => {
                self.push_full_snapshot_hash(FullSnapshotHash {
                    hash: snapshot_hash,
                });
            }
            SnapshotType::IncrementalSnapshot(base_slot) => {
                let latest_full_snapshot_hash = *self.full_snapshot_hashes.hashes.last().unwrap();
                assert_eq!(
                    base_slot, latest_full_snapshot_hash.0,
                    "the incremental snapshot's base slot ({}) must match the latest full snapshot hash's slot ({})",
                    base_slot, latest_full_snapshot_hash.0,
                );
                self.push_incremental_snapshot_hash(IncrementalSnapshotHash {
                    base: latest_full_snapshot_hash,
                    hash: snapshot_hash,
                });
            }
        }
    }
fn push_snapshot_hash ( & mut self , snapshot_type : SnapshotType , snapshot_hash : ( Slot , Hash ) ) { match snapshot_type { SnapshotType :: FullSnapshot => { self . push_full_snapshot_hash ( FullSnapshotHash { hash : snapshot_hash , } ) ; } SnapshotType :: IncrementalSnapshot ( base_slot ) => { let latest_full_snapshot_hash = * self . full_snapshot_hashes . hashes . last ( ) . unwrap ( ) ; assert_eq ! ( base_slot latest_full_snapshot_hash 0 " " base_slot latest_full_snapshot_hash 0 ) ; self . push_incremental_snapshot_hash ( IncrementalSnapshotHash { base : latest_full_snapshot_hash , hash : snapshot_hash , } ) ; } } }
Add `snapshot_hash` to its respective vector of hashes, then push that vector to the
cluster via CRDS.
Add ` snapshot_hash ` to its respective vector of hashes then push that vector to the cluster via CRDS .
&mut self
snapshot_type
SnapshotType
snapshot_hash
(Slot, Hash)