Skip to content

Commit

Permalink
pr: return crds value
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo committed Oct 7, 2021
1 parent 4cbb134 commit 8d208c9
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions gossip/src/cluster_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1116,17 +1116,16 @@ impl ClusterInfo {
Some(map(hashes))
}

#[allow(clippy::type_complexity)]
pub fn get_incremental_snapshot_hashes_for_node(
&self,
pubkey: &Pubkey,
) -> Option<((Slot, Hash), Vec<(Slot, Hash)>)> {
let gossip_crds = self.gossip.crds.read().unwrap();
let incremental_snapshot_hashes = gossip_crds.get::<&IncrementalSnapshotHashes>(*pubkey)?;
Some((
incremental_snapshot_hashes.base,
incremental_snapshot_hashes.hashes.clone(),
))
) -> Option<IncrementalSnapshotHashes> {
self.gossip
.crds
.read()
.unwrap()
.get::<&IncrementalSnapshotHashes>(*pubkey)
.cloned()
}

/// Returns epoch-slots inserted since the given cursor.
Expand Down

0 comments on commit 8d208c9

Please sign in to comment.