Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Merged
Prev Previous commit
Next Next commit
move around contactinfo match arm
  • Loading branch information
greg committed Dec 1, 2023
commit 30f80c3669f024cf1bf25d013277d492b8f2ce20
4 changes: 2 additions & 2 deletions gossip/src/cluster_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3080,19 +3080,19 @@ fn filter_on_shred_version(
if crds.get_shred_version(from) == Some(self_shred_version) {
values.retain(|value| match &value.data {
// Allow contact-infos so that shred-versions are updated.
CrdsData::ContactInfo(_) => true,
CrdsData::LegacyContactInfo(_) => true,
CrdsData::NodeInstance(_) => true,
CrdsData::ContactInfo(_) => true,
// Only retain values with the same shred version.
_ => crds.get_shred_version(&value.pubkey()) == Some(self_shred_version),
})
} else {
values.retain(|value| match &value.data {
// Allow node to update its own contact info in case their
// shred-version changes
CrdsData::ContactInfo(node) => node.pubkey() == from,
CrdsData::LegacyContactInfo(node) => node.pubkey() == from,
CrdsData::NodeInstance(_) => true,
CrdsData::ContactInfo(node) => node.pubkey() == from,
_ => false,
})
}
Expand Down