diff --git a/gossip/src/cluster_info.rs b/gossip/src/cluster_info.rs index f8f37189fda510..82564c69ba335e 100644 --- a/gossip/src/cluster_info.rs +++ b/gossip/src/cluster_info.rs @@ -1961,14 +1961,17 @@ impl ClusterInfo { requests .into_par_iter() .with_min_len(1024) - .filter(|(_, _, caller)| match caller.contact_info() { - None => false, - Some(caller) if caller.pubkey() == &self_pubkey => { - warn!("PullRequest ignored, I'm talking to myself"); - self.stats.window_request_loopback.add_relaxed(1); - false + .filter(|(_, _, caller)| match &caller.data { + CrdsData::LegacyContactInfo(_) | CrdsData::ContactInfo(_) => { + if caller.pubkey() == self_pubkey { + warn!("PullRequest ignored, I'm talking to myself"); + self.stats.window_request_loopback.add_relaxed(1); + false + } else { + true + } } - Some(_) => true, + _ => false, }) .map(|(from_addr, filter, caller)| PullData { from_addr, diff --git a/gossip/src/crds_value.rs b/gossip/src/crds_value.rs index 6dcbbde2d14373..2e890360850696 100644 --- a/gossip/src/crds_value.rs +++ b/gossip/src/crds_value.rs @@ -656,7 +656,7 @@ impl CrdsValue { CrdsData::RestartHeaviestFork(_) => CrdsValueLabel::RestartHeaviestFork(self.pubkey()), } } - pub fn contact_info(&self) -> Option<&LegacyContactInfo> { + pub(crate) fn contact_info(&self) -> Option<&LegacyContactInfo> { match &self.data { CrdsData::LegacyContactInfo(contact_info) => Some(contact_info), _ => None,